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

Function main

example/cpp17/coroutines_ts/refactored_echo_server.cpp:63–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63int main()
64{
65 try
66 {
67 boost::asio::io_context io_context(1);
68
69 boost::asio::signal_set signals(io_context, SIGINT, SIGTERM);
70 signals.async_wait([&](auto, auto){ io_context.stop(); });
71
72 co_spawn(io_context, listener(), detached);
73
74 io_context.run();
75 }
76 catch (std::exception& e)
77 {
78 std::printf("Exception: %s\n", e.what());
79 }
80}

Callers

nothing calls this directly

Calls 5

listenerFunction · 0.70
co_spawnFunction · 0.50
async_waitMethod · 0.45
stopMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected