| 176 | |
| 177 | private: |
| 178 | void do_write() // always called from the asio-service-thread |
| 179 | { |
| 180 | if (!is_writing_) { |
| 181 | std::string data; |
| 182 | if (send_queue_.try_pop(data)) { |
| 183 | write_some(std::move(data)); |
| 184 | } |
| 185 | } |
| 186 | } |
| 187 | |
| 188 | void stop() // always called from the asio-service-thread |
| 189 | { |