| 48 | } |
| 49 | |
| 50 | void do_read_header() |
| 51 | { |
| 52 | boost::asio::async_read(socket_, |
| 53 | boost::asio::buffer(read_msg_.data(), chat_message::header_length), |
| 54 | [this](boost::system::error_code ec, std::size_t /*length*/) |
| 55 | { |
| 56 | if (!ec && read_msg_.decode_header()) |
| 57 | { |
| 58 | do_read_body(); |
| 59 | } |
| 60 | else |
| 61 | { |
| 62 | close(); |
| 63 | } |
| 64 | }); |
| 65 | } |
| 66 | |
| 67 | void do_read_body() |
| 68 | { |
nothing calls this directly
no test coverage detected