| 343 | } |
| 344 | |
| 345 | void |
| 346 | on_write( |
| 347 | bool keep_alive, |
| 348 | beast::error_code ec, |
| 349 | std::size_t bytes_transferred) |
| 350 | { |
| 351 | boost::ignore_unused(bytes_transferred); |
| 352 | |
| 353 | if(ec) |
| 354 | return fail(ec, "write"); |
| 355 | |
| 356 | if(! keep_alive) |
| 357 | { |
| 358 | // This means we should close the connection, usually because |
| 359 | // the response indicated the "Connection: close" semantic. |
| 360 | return do_close(); |
| 361 | } |
| 362 | |
| 363 | // Read another request |
| 364 | do_read(); |
| 365 | } |
| 366 | |
| 367 | void |
| 368 | do_close() |