| 57 | } |
| 58 | |
| 59 | int main() |
| 60 | { |
| 61 | try |
| 62 | { |
| 63 | boost::asio::io_context io_context(1); |
| 64 | |
| 65 | boost::asio::signal_set signals(io_context, SIGINT, SIGTERM); |
| 66 | signals.async_wait([&](auto, auto){ io_context.stop(); }); |
| 67 | |
| 68 | co_spawn(io_context, listener(), detached); |
| 69 | |
| 70 | io_context.run(); |
| 71 | } |
| 72 | catch (std::exception& e) |
| 73 | { |
| 74 | std::printf("Exception: %s\n", e.what()); |
| 75 | } |
| 76 | } |
nothing calls this directly
no test coverage detected