Print the _local_ endpoint Boost ASIO assigns a port to, fixes #2097

This commit is contained in:
Daniel J. Hofmann 2016-03-18 12:09:28 +01:00
parent a6aa0a4cb0
commit b1c84b598f

View File

@ -51,6 +51,9 @@ class Server
acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true));
acceptor.bind(endpoint);
acceptor.listen();
util::SimpleLogger().Write() << "Listening on: " << acceptor.local_endpoint();
acceptor.async_accept(
new_connection->socket(),
boost::bind(&Server::HandleAccept, this, boost::asio::placeholders::error));