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

Method do_accept

example/cpp11/http/server2/server.cpp:54–74  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

async_acceptMethod · 0.45
is_openMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected