| 291 | } |
| 292 | |
| 293 | void |
| 294 | on_write( |
| 295 | bool keep_alive, |
| 296 | beast::error_code ec, |
| 297 | std::size_t bytes_transferred) |
| 298 | { |
| 299 | boost::ignore_unused(bytes_transferred); |
| 300 | |
| 301 | if(ec) |
| 302 | return fail(ec, "write"); |
| 303 | |
| 304 | if(! keep_alive) |
| 305 | { |
| 306 | // This means we should close the connection, usually because |
| 307 | // the response indicated the "Connection: close" semantic. |
| 308 | return do_close(); |
| 309 | } |
| 310 | |
| 311 | // Read another request |
| 312 | do_read(); |
| 313 | } |
| 314 | |
| 315 | void |
| 316 | do_close() |