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

Method on_write

example/http/server/flex/http_server_flex.cpp:315–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

313 }
314
315 void
316 on_write(
317 bool keep_alive,
318 beast::error_code ec,
319 std::size_t bytes_transferred)
320 {
321 boost::ignore_unused(bytes_transferred);
322
323 if(ec)
324 return fail(ec, "write");
325
326 if(! keep_alive)
327 {
328 // This means we should close the connection, usually because
329 // the response indicated the "Connection: close" semantic.
330 return derived().do_eof();
331 }
332
333 // Read another request
334 do_read();
335 }
336};
337
338// Handles a plain HTTP connection

Callers

nothing calls this directly

Calls 2

failFunction · 0.70
do_eofMethod · 0.45

Tested by

no test coverage detected