| 80 | } |
| 81 | |
| 82 | void do_read_body() |
| 83 | { |
| 84 | boost::asio::async_read(socket_, |
| 85 | boost::asio::buffer(read_msg_.body(), read_msg_.body_length()), |
| 86 | [this](boost::system::error_code ec, std::size_t /*length*/) |
| 87 | { |
| 88 | if (!ec) |
| 89 | { |
| 90 | std::cout.write(read_msg_.body(), read_msg_.body_length()); |
| 91 | std::cout << "\n"; |
| 92 | do_read_header(); |
| 93 | } |
| 94 | else |
| 95 | { |
| 96 | socket_.close(); |
| 97 | } |
| 98 | }); |
| 99 | } |
| 100 | |
| 101 | void do_write() |
| 102 | { |
nothing calls this directly
no test coverage detected