Beast Logo

PrevUpHomeNext

prepare_buffers

Return a shortened buffer sequence.

template<
    class BufferSequence>
implementation-defined
prepare_buffers(
    std::size_t n,
    BufferSequence const& buffers);

This function returns a new buffer sequence which adapts the passed buffer sequence and efficiently presents a shorter subset of the original list of buffers starting with the first byte of the original sequence.

Parameters

n

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

The buffer sequence to adapt. A copy of the sequence will be made, but ownership of the underlying memory is not transferred.

Requirements

Header: beast/core/prepare_buffers.hpp

Convenience header: beast/core.hpp


PrevUpHomeNext