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

Function main

example/cpp14/echo/async_tcp_echo_server.cpp:95–117  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93};
94
95int main(int argc, char* argv[])
96{
97 try
98 {
99 if (argc != 2)
100 {
101 std::cerr << "Usage: async_tcp_echo_server <port>\n";
102 return 1;
103 }
104
105 boost::asio::io_context io_context;
106
107 server s(io_context, std::atoi(argv[1]));
108
109 io_context.run();
110 }
111 catch (std::exception& e)
112 {
113 std::cerr << "Exception: " << e.what() << "\n";
114 }
115
116 return 0;
117}

Callers

nothing calls this directly

Calls 1

runMethod · 0.45

Tested by

no test coverage detected