| 72 | } |
| 73 | |
| 74 | void start_receive() |
| 75 | { |
| 76 | // Discard any data already in the buffer. |
| 77 | reply_buffer_.consume(reply_buffer_.size()); |
| 78 | |
| 79 | // Wait for a reply. We prepare the buffer to receive up to 64KB. |
| 80 | socket_.async_receive(reply_buffer_.prepare(65536), |
| 81 | std::bind(&pinger::handle_receive, this, std::placeholders::_2)); |
| 82 | } |
| 83 | |
| 84 | void handle_receive(std::size_t length) |
| 85 | { |
nothing calls this directly
no test coverage detected