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

Method write

test/bench/parser/nodejs_parser.hpp:263–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261template<class Derived>
262template<class ConstBufferSequence>
263std::size_t
264nodejs_basic_parser<Derived>::write(
265 ConstBufferSequence const& buffers, error_code& ec)
266{
267 static_assert(net::is_const_buffer_sequence<
268 ConstBufferSequence>::value,
269 "ConstBufferSequence type requirements not met");
270 std::size_t bytes_used = 0;
271 for(auto buffer : beast::buffers_range_ref(buffers))
272 {
273 auto const n = write(
274 static_cast<void const*>(buffer.data()),
275 buffer.size(), ec);
276 if(ec)
277 return 0;
278 bytes_used += n;
279 if(complete())
280 break;
281 }
282 return bytes_used;
283}
284
285template<class Derived>
286http_parser_settings const*

Callers 13

mainFunction · 0.45
mainFunction · 0.45
do_sessionFunction · 0.45
do_sync_sessionFunction · 0.45
do_sessionFunction · 0.45
operator()Method · 0.45
read_and_print_bodyFunction · 0.45
snippetsFunction · 0.45
testParser1Method · 0.45
doDeflateBeastMethod · 0.45
doInflateBeastMethod · 0.45
do_syncMethod · 0.45

Calls 4

completeFunction · 0.85
writeFunction · 0.50
dataMethod · 0.45
sizeMethod · 0.45

Tested by 1

do_syncMethod · 0.36