To facilitate working with instances of the __ConstBufferSequence__ and __MutableBufferSequence__ concepts introduced in __Asio__, Beast treats those sequences as a special type of range. The following algorithms and wrappers are provided which transform these ranges efficiently using lazy evaluation. No memory allocations are used in the transformations; instead, they create lightweight iterators over the existing, unmodified memory buffers. Control of buffers is retained by the caller; ownership is not transferred.
This is a more reliable version of [@boost:/doc/html/boost_asio/reference/buffer_size.html `net::buffer_size`] which is easier to use and also works for types which are convertible to `net::const_buffer` or `net::mutable_buffer`.
This functions returns a new buffer sequence which, when iterated, traverses the sequence which would be formed if all of the input buffer sequences were concatenated. With this routine, multiple calls to a stream's `write_some` function may be combined into one, eliminating expensive system calls.
This class represents the buffer sequence formed by concatenating two or more buffer sequences. This is type of object returned by [link beast.ref.boost__beast__buffers_cat `buffers_cat`].
This class represents the buffer sequence formed from a prefix of an existing buffer sequence. This is the type of buffer returned by [link beast.ref.boost__beast__buffers_prefix `buffers_prefix`].
This function returns an iterable range representing the passed buffer sequence. The values obtained when iterating the range will always be a constant buffer, unless the underlying buffer sequence is mutable, in which case the value obtained when iterating will be a mutable buffer. It is intended as a notational convenience when writing a ['range-for] statement over a buffer sequence. The function [link beast.ref.boost__beast__buffers_range_ref `buffers_range`] maintains a copy of the buffer sequence, while [link beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`] maintains a reference (in this case, the caller must ensure that the lifetime of the referenced buffer sequence extends until the range object is destroyed).