MCPcopy Create free account
hub / github.com/boostorg/asio / read_at_buffer_sequence

Function read_at_buffer_sequence

include/boost/asio/impl/read_at.hpp:44–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42 template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,
43 typename MutableBufferIterator, typename CompletionCondition>
44 std::size_t read_at_buffer_sequence(SyncRandomAccessReadDevice& d,
45 uint64_t offset, const MutableBufferSequence& buffers,
46 const MutableBufferIterator&, CompletionCondition completion_condition,
47 boost::system::error_code& ec)
48 {
49 ec = boost::system::error_code();
50 boost::asio::detail::consuming_buffers<mutable_buffer,
51 MutableBufferSequence, MutableBufferIterator> tmp(buffers);
52 while (!tmp.empty())
53 {
54 if (std::size_t max_size = detail::adapt_completion_condition_result(
55 completion_condition(ec, tmp.total_consumed())))
56 {
57 tmp.consume(d.read_some_at(offset + tmp.total_consumed(),
58 tmp.prepare(max_size), ec));
59 }
60 else
61 break;
62 }
63 return tmp.total_consumed();
64 }
65} // namespace detail
66
67template <typename SyncRandomAccessReadDevice, typename MutableBufferSequence,

Callers 1

read_atFunction · 0.85

Calls 6

emptyMethod · 0.45
total_consumedMethod · 0.45
consumeMethod · 0.45
read_some_atMethod · 0.45
prepareMethod · 0.45

Tested by

no test coverage detected