| 242 | } |
| 243 | |
| 244 | void |
| 245 | do_read() |
| 246 | { |
| 247 | // Make the request empty before reading, |
| 248 | // otherwise the operation behavior is undefined. |
| 249 | req_ = {}; |
| 250 | |
| 251 | // Set the timeout. |
| 252 | stream_.expires_after(std::chrono::seconds(30)); |
| 253 | |
| 254 | // Read a request |
| 255 | http::async_read(stream_, buffer_, req_, |
| 256 | beast::bind_front_handler( |
| 257 | &session::on_read, |
| 258 | shared_from_this())); |
| 259 | } |
| 260 | |
| 261 | void |
| 262 | on_read( |
nothing calls this directly
no test coverage detected