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

Method on_write

example/http/client/crawl/http_crawl.cpp:258–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256 }
257
258 void
259 on_write(
260 beast::error_code ec,
261 std::size_t bytes_transferred)
262 {
263 boost::ignore_unused(bytes_transferred);
264
265 if(ec)
266 {
267 report_.aggregate(
268 [](crawl_report& rep)
269 {
270 ++rep.write_failures;
271 });
272 return do_get_host();
273 }
274
275 // Receive the HTTP response
276 res_ = {};
277 http::async_read(
278 stream_,
279 buffer_,
280 res_,
281 beast::bind_front_handler(
282 &worker::on_read,
283 shared_from_this()));
284 }
285
286 void
287 on_read(

Callers

nothing calls this directly

Calls 3

bind_front_handlerFunction · 0.85
aggregateMethod · 0.80
async_readFunction · 0.50

Tested by

no test coverage detected