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

Function main

example/cpp17/coroutines_ts/echo_server_with_default.cpp:56–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56int main()
57{
58 try
59 {
60 boost::asio::io_context io_context(1);
61
62 boost::asio::signal_set signals(io_context, SIGINT, SIGTERM);
63 signals.async_wait([&](auto, auto){ io_context.stop(); });
64
65 co_spawn(io_context, listener(), detached);
66
67 io_context.run();
68 }
69 catch (std::exception& e)
70 {
71 std::printf("Exception: %s\n", e.what());
72 }
73}

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