| 60 | } |
| 61 | |
| 62 | net::awaitable<void> |
| 63 | acceptor(ssl::context& ctx) |
| 64 | { |
| 65 | auto executor = co_await net::this_coro::executor; |
| 66 | net::ip::tcp::endpoint endpoint{ {}, 8080 }; |
| 67 | net::ip::tcp::acceptor acceptor{ executor, endpoint }; |
| 68 | |
| 69 | for(;;) |
| 70 | { |
| 71 | net::co_spawn( |
| 72 | executor, |
| 73 | handle_session({ co_await acceptor.async_accept(), ctx }), |
| 74 | print_exception); |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | int |
| 79 | main() |
no test coverage detected