| 292 | } |
| 293 | |
| 294 | void |
| 295 | do_read() |
| 296 | { |
| 297 | // Make the request empty before reading, |
| 298 | // otherwise the operation behavior is undefined. |
| 299 | req_ = {}; |
| 300 | |
| 301 | // Set the timeout. |
| 302 | beast::get_lowest_layer(stream_).expires_after(std::chrono::seconds(30)); |
| 303 | |
| 304 | // Read a request |
| 305 | http::async_read(stream_, buffer_, req_, |
| 306 | beast::bind_front_handler( |
| 307 | &session::on_read, |
| 308 | shared_from_this())); |
| 309 | } |
| 310 | |
| 311 | void |
| 312 | on_read( |
nothing calls this directly
no test coverage detected