| 99 | |
| 100 | private: |
| 101 | void do_read_header() |
| 102 | { |
| 103 | auto self(shared_from_this()); |
| 104 | boost::asio::async_read(socket_, |
| 105 | boost::asio::buffer(read_msg_.data(), chat_message::header_length), |
| 106 | [this, self](boost::system::error_code ec, std::size_t /*length*/) |
| 107 | { |
| 108 | if (!ec && read_msg_.decode_header()) |
| 109 | { |
| 110 | do_read_body(); |
| 111 | } |
| 112 | else |
| 113 | { |
| 114 | room_.leave(shared_from_this()); |
| 115 | } |
| 116 | }); |
| 117 | } |
| 118 | |
| 119 | void do_read_body() |
| 120 | { |
nothing calls this directly
no test coverage detected