| 82 | } |
| 83 | |
| 84 | int main() |
| 85 | { |
| 86 | try |
| 87 | { |
| 88 | boost::asio::io_context io_context(1); |
| 89 | |
| 90 | boost::asio::signal_set signals(io_context, SIGINT, SIGTERM); |
| 91 | signals.async_wait([&](auto, auto){ io_context.stop(); }); |
| 92 | |
| 93 | tcp::acceptor acceptor(io_context, {tcp::v4(), 55555}); |
| 94 | co_spawn(io_context, listener(std::move(acceptor)), detached); |
| 95 | |
| 96 | io_context.run(); |
| 97 | } |
| 98 | catch (std::exception& e) |
| 99 | { |
| 100 | std::printf("Exception: %s\n", e.what()); |
| 101 | } |
| 102 | } |
nothing calls this directly
no test coverage detected