| 45 | } |
| 46 | |
| 47 | void handle_receive(const boost::system::error_code& error, |
| 48 | std::size_t /*bytes_transferred*/) |
| 49 | { |
| 50 | if (!error) |
| 51 | { |
| 52 | std::shared_ptr<std::string> message( |
| 53 | new std::string(make_daytime_string())); |
| 54 | |
| 55 | socket_.async_send_to(boost::asio::buffer(*message), remote_endpoint_, |
| 56 | std::bind(&udp_server::handle_send, this, message, |
| 57 | boost::asio::placeholders::error, |
| 58 | boost::asio::placeholders::bytes_transferred)); |
| 59 | |
| 60 | start_receive(); |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | void handle_send(std::shared_ptr<std::string> /*message*/, |
| 65 | const boost::system::error_code& /*error*/, |
nothing calls this directly
no test coverage detected