MCPcopy Create free account
hub / github.com/boostorg/beast / on_write

Method on_write

example/advanced/server/advanced_server.cpp:449–474  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

447 }
448
449 void
450 on_write(
451 bool keep_alive,
452 beast::error_code ec,
453 std::size_t bytes_transferred)
454 {
455 boost::ignore_unused(bytes_transferred);
456
457 if(ec)
458 return fail(ec, "write");
459
460 if(! keep_alive)
461 {
462 // This means we should close the connection, usually because
463 // the response indicated the "Connection: close" semantic.
464 return do_close();
465 }
466
467 // Resume the read if it has been paused
468 if(response_queue_.size() == queue_limit)
469 do_read();
470
471 response_queue_.pop();
472
473 do_write();
474 }
475
476 void
477 do_close()

Callers 1

on_readMethod · 0.95

Calls 2

failFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected