Skip to content

Commit f563217

Browse files
committed
fix build errors and warnings
1 parent bdc1e6d commit f563217

2 files changed

Lines changed: 13 additions & 5 deletions

File tree

include/crow/routing.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ namespace crow // NOTE: Already documented in "crow/app.h"
473473
void handle_upgrade(const request& req, response&, UnixSocketAdaptor&& adaptor) override
474474
{
475475
max_payload_ = max_payload_override_ ? max_payload_ : app_->websocket_max_payload();
476-
new crow::websocket::Connection<UnixSocketAdaptor, App>(req, std::move(adaptor), app_, max_payload_, open_handler_, message_handler_, close_handler_, error_handler_, accept_handler_);
476+
new crow::websocket::Connection<UnixSocketAdaptor, App>(req, std::move(adaptor), app_, max_payload_, subprotocols_, open_handler_, message_handler_, close_handler_, error_handler_, accept_handler_);
477477
}
478478
#ifdef CROW_ENABLE_SSL
479479
void handle_upgrade(const request& req, response&, SSLAdaptor&& adaptor) override

include/crow/socket_acceptors.h

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ namespace crow
1313
{
1414
using endpoint = tcp::endpoint;
1515
tcp::acceptor acceptor_;
16-
TCPAcceptor(asio::io_service& io_service, const endpoint& endpoint):
17-
acceptor_(io_service, endpoint) {}
16+
TCPAcceptor(asio::io_service& io_service, const endpoint& endpoint_):
17+
acceptor_(io_service, endpoint_) {}
1818

1919
int16_t port() const
2020
{
@@ -28,14 +28,18 @@ namespace crow
2828
{
2929
return acceptor_;
3030
}
31+
endpoint local_endpoint() const
32+
{
33+
return acceptor_.local_endpoint();
34+
}
3135
};
3236

3337
struct UnixSocketAcceptor
3438
{
3539
using endpoint = stream_protocol::endpoint;
3640
stream_protocol::acceptor acceptor_;
37-
UnixSocketAcceptor(asio::io_service& io_service, const endpoint& endpoint):
38-
acceptor_(io_service, endpoint, false) {}
41+
UnixSocketAcceptor(asio::io_service& io_service, const endpoint& endpoint_):
42+
acceptor_(io_service, endpoint_, false) {}
3943
// reuse addr must be false (https://github.com/chriskohlhoff/asio/issues/622)
4044

4145
int16_t port() const
@@ -50,5 +54,9 @@ namespace crow
5054
{
5155
return acceptor_;
5256
}
57+
endpoint local_endpoint() const
58+
{
59+
return acceptor_.local_endpoint();
60+
}
5361
};
5462
} // namespace crow

0 commit comments

Comments
 (0)