MCPcopy Create free account
hub / github.com/boostorg/asio / do_accept

Method do_accept

example/cpp11/http/server/server.cpp:58–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void server::do_accept()
59{
60 acceptor_.async_accept(
61 [this](boost::system::error_code ec, boost::asio::ip::tcp::socket socket)
62 {
63 // Check whether the server was stopped by a signal before this
64 // completion handler had a chance to run.
65 if (!acceptor_.is_open())
66 {
67 return;
68 }
69
70 if (!ec)
71 {
72 connection_manager_.start(std::make_shared<connection>(
73 std::move(socket), connection_manager_, request_handler_));
74 }
75
76 do_accept();
77 });
78}
79
80void server::do_await_stop()
81{

Callers

nothing calls this directly

Calls 3

async_acceptMethod · 0.45
is_openMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected