Beast Logo

PrevUpHomeNext

buffers_adapter

Adapts a MutableBufferSequence into a DynamicBuffer.

template<
    class MutableBufferSequence>
class buffers_adapter
Types

Name

Description

const_buffers_type

The type used to represent the input sequence as a list of buffers.

mutable_buffers_type

The type used to represent the output sequence as a list of buffers.

Member Functions

Name

Description

buffers_adapter

Move constructor.

Copy constructor.

Construct a buffers adapter.

commit

Move bytes from the output sequence to the input sequence.

consume

Remove bytes from the input sequence.

data

Get a list of buffers that represents the input sequence.

max_size

Returns the largest size output sequence possible.

operator=

Move assignment.

Copy assignment.

prepare

Get a list of buffers that represents the output sequence, with the given size.

size

Get the size of the input sequence.

This class wraps a MutableBufferSequence to meet the requirements of DynamicBuffer. Upon construction the input and output sequences are empty. A copy of the mutable buffer sequence object is stored; however, ownership of the underlying memory is not transferred. The caller is responsible for making sure that referenced memory remains valid for the duration of any operations.

The size of the mutable buffer sequence determines the maximum number of bytes which may be prepared and committed.

MutableBufferSequence

The type of mutable buffer sequence to wrap.

Requirements

Header: beast/core/buffers_adapter.hpp

Convenience header: beast/core.hpp


PrevUpHomeNext