| 39 | |
| 40 | private: |
| 41 | void do_receive() |
| 42 | { |
| 43 | socket_.async_receive_from( |
| 44 | boost::asio::buffer(data_), sender_endpoint_, |
| 45 | [this](boost::system::error_code ec, std::size_t length) |
| 46 | { |
| 47 | if (!ec) |
| 48 | { |
| 49 | std::cout.write(data_.data(), length); |
| 50 | std::cout << std::endl; |
| 51 | |
| 52 | do_receive(); |
| 53 | } |
| 54 | }); |
| 55 | } |
| 56 | |
| 57 | boost::asio::ip::udp::socket socket_; |
| 58 | boost::asio::ip::udp::endpoint sender_endpoint_; |
nothing calls this directly
no test coverage detected