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

Method on_write

example/advanced/server-flex/advanced_server_flex.cpp:560–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558 }
559
560 void
561 on_write(
562 bool keep_alive,
563 beast::error_code ec,
564 std::size_t bytes_transferred)
565 {
566 boost::ignore_unused(bytes_transferred);
567
568 if(ec)
569 return fail(ec, "write");
570
571 if(! keep_alive)
572 {
573 // This means we should close the connection, usually because
574 // the response indicated the "Connection: close" semantic.
575 return derived().do_eof();
576 }
577
578 // Resume the read if it has been paused
579 if(response_queue_.size() == queue_limit)
580 do_read();
581
582 response_queue_.pop();
583
584 do_write();
585 }
586};
587
588//------------------------------------------------------------------------------

Callers

nothing calls this directly

Calls 3

failFunction · 0.70
do_eofMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected