| 367 | { |
| 368 | public: |
| 369 | server(boost::asio::io_context& io_context, |
| 370 | const tcp::endpoint& listen_endpoint, |
| 371 | const udp::endpoint& broadcast_endpoint) |
| 372 | : io_context_(io_context), |
| 373 | acceptor_(io_context, listen_endpoint) |
| 374 | { |
| 375 | channel_.join( |
| 376 | std::make_shared<udp_broadcaster>( |
| 377 | io_context_, broadcast_endpoint)); |
| 378 | |
| 379 | accept(); |
| 380 | } |
| 381 | |
| 382 | private: |
| 383 | void accept() |