Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext
buffers_prefix (3 of 3 overloads)

Returns a prefix of a buffer sequence.

Synopsis

Defined in header <boost/beast/core/buffers_prefix.hpp>

template<
    class BufferSequence>
buffers_prefix_view< BufferSequence >
buffers_prefix(
    std::size_t size,
    BufferSequence const& buffers);
Description

This function returns a new buffer sequence which when iterated, presents a shorter subset of the original list of buffers starting with the first byte of the original sequence.

Parameters

Name

Description

size

The maximum number of bytes in the wrapped sequence. If this is larger than the size of passed, buffers, the resulting sequence will represent the entire input sequence.

buffers

An instance of ConstBufferSequence or MutableBufferSequence to adapt. A copy of the sequence will be made, but ownership of the underlying memory is not transferred.

Convenience header <boost/beast/core.hpp>


PrevUpHomeNext