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

Function server

example/cpp11/echo/blocking_tcp_echo_server.cpp:45–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void server(boost::asio::io_context& io_context, unsigned short port)
46{
47 tcp::acceptor a(io_context, tcp::endpoint(tcp::v4(), port));
48 for (;;)
49 {
50 std::thread(session, a.accept()).detach();
51 }
52}
53
54int main(int argc, char* argv[])
55{

Callers 1

mainFunction · 0.70

Calls 3

detachMethod · 0.80
endpointClass · 0.50
acceptMethod · 0.45

Tested by

no test coverage detected