...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Adapts a MutableBufferSequence into a DynamicBuffer.
Defined in header <boost/beast/core/buffers_adaptor.hpp>
template< class MutableBufferSequence> class buffers_adaptor
Name |
Description |
---|---|
The ConstBufferSequence used to represent the readable bytes. |
|
The MutableBufferSequence used to represent the writable bytes. |
|
The type of the underlying mutable buffer sequence. |
Name |
Description |
---|---|
buffers_adaptor [constructor] |
Construct a buffers adaptor. |
Return the maximum number of bytes, both readable and writable, that can be held without requiring an allocation. |
|
Returns a constant buffer sequence representing the readable bytes. |
|
Append writable bytes to the readable bytes. |
|
Remove bytes from beginning of the readable bytes. |
|
Returns a constant buffer sequence representing the readable bytes.
|
|
Return the maximum number of bytes, both readable and writable, that can ever be held. |
|
Copy Assignment. |
|
Returns a mutable buffer sequence representing writable bytes. |
|
Returns the number of readable bytes. |
|
Returns the original mutable buffer 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.
Type |
Description |
---|---|
|
The type of mutable buffer sequence to adapt. |