en	DynamicBuffer
zh-hans	动态缓冲区

en	A dynamic buffer encapsulates memory storage that may be automatically resized as required, where the memory is divided into an input sequence followed by an output sequence. These memory regions are internal to the dynamic buffer, but direct access to the elements is provided to permit them to be efficiently used with I/O operations, such as the send or receive operations of a socket. Data written to the output sequence of a dynamic buffer object is appended to the input sequence of the same object.
zh-hans	动态缓冲区用于封装可根据需要自动调整大小的内存存储。该内存被划分为一个输入序列和一个输出序列。这些内存区域属于动态缓冲区的内部，但提供对元素的直接访问，以便将其高效用于 I/O 操作，例如套接字的发送或接收操作。写入动态缓冲区对象输出序列的数据，将被追加到该对象的输入序列中。

en	The interface to this concept is intended to permit the following implementation strategies:
zh-hans	该概念的接口旨在支持以下实现策略：

en	* A single contiguous octet array, which is reallocated as necessary to
zh-hans	* 使用单个连续字节数组，并根据需要对该数组进行重新分配

en	* A sequence of one or more octet arrays, where each array is of the same
zh-hans	* 使用一个或多个字节数组的序列，其中每个数组的大小均相同

en	* A sequence of one or more octet arrays of varying sizes. Additional octet
zh-hans	* 使用一个或多个大小可变的字节数组序列。额外的字节

en	Associated With
zh-hans	关联于

en	* `boost::asio::is_dynamic_buffer` * __ConstBufferSequence__ * __MutableBufferSequence__

en	Requirements
zh-hans	要求

en	* `D` denotes a dynamic buffer class. * `a` denotes a value of type `D`. * `c` denotes a (possibly const) value of type `D`. * `n` denotes a value of type `std::size_t`. * `T` denotes a type meeting the requirements for __ConstBufferSequence__. * `U` denotes a type meeting the requirements for __MutableBufferSequence__.
zh-hans	* `D`：用于表示一个动态缓冲区类。 * `a`：用于表示一个 `D` 类型的值。 * `c`：用于表示一个 `D` 类型的值（可能为 const）。 * `n`：用于表示一个 `std::size_t` 类型的值。 * `T`：用于表示一个满足 __ConstBufferSequence__ 要求的类型。 * `U`：用于表示一个满足 __MutableBufferSequence__ 要求的类型。

en	Valid expressions
zh-hans	合法表达式

en	Expression
zh-hans	表达式

en	Type
zh-hans	类型

en	Semantics, Pre/Post-conditions
zh-hans	语义，前置/后置条件

en	`D::const_buffers_type`

en	`T`

en	This type represents the memory associated with the input sequence.
zh-hans	该类型用于表示与输入序列关联的内存。

en	`D::mutable_buffers_type`

en	`U`

en	This type represents the memory associated with the output sequence.
zh-hans	该类型用于表示与输出序列关联的内存。

en	`c.size()`

en	`std::size_t`

en	Returns the size, in bytes, of the input sequence.
zh-hans	返回输入序列的大小（以字节为单位）。

en	`c.max_size()`

en	Returns the permitted maximum of the sum of the sizes of the input sequence and output sequence.
zh-hans	返回输入序列和输出序列大小之和的允许最大值。

en	`c.capacity()`

en	Returns the maximum sum of the sizes of the input sequence and output sequence that the dynamic buffer can hold without requiring reallocation.
zh-hans	返回动态缓冲区在无需重新分配内存的情况下，所能容纳的输入序列和输出序列大小之和的最大值。

en	`c.data()`

en	Returns a constant buffer sequence u that represents the memory associated with the input sequence, and where `buffer_size(u) == size()`.
zh-hans	返回一个常量缓冲区序列 `u`，该序列表示与输入序列关联的内存，且满足 `buffer_size(u) == size()`。

en	`a.prepare(n)`

en	Returns a mutable buffer sequence u representing the output sequence, and where `buffer_size(u) == n`. The dynamic buffer reallocates memory as required. All constant or mutable buffer sequences previously obtained using `data()` or `prepare()` are invalidated. Throws: `length_error` if `size() + n` exceeds `max_size()`.
zh-hans	返回一个表示输出序列的可变缓冲区序列 `u`，且满足 `buffer_size(u) == n`。动态缓冲区会根据需要重新分配内存。此前通过 `data()` 或 `prepare()` 获取的所有常量或可变缓冲区序列均会失效。 抛出异常：如果 `size() + n` 超过 `max_size()`，则抛出 `length_error`。

en	`a.commit(n)`

en	Appends `n` bytes from the start of the output sequence to the end of the input sequence. The remainder of the output sequence is discarded. If `n` is greater than the size of the output sequence, the entire output sequence is appended to the input sequence. All constant or mutable buffer sequences previously obtained using `data()` or `prepare()` are invalidated.
zh-hans	将输出序列开头的 `n` 个字节追加到输入序列的末尾。输出序列的剩余部分将被丢弃。如果 `n` 大于输出序列的大小，则将整个输出序列追加到输入序列中。此前通过 `data()` 或 `prepare()` 获取的所有常量或可变缓冲区序列均会失效。

en	`a.consume(n)`

en	Removes `n` bytes from beginning of the input sequence. If `n` is greater than the size of the input sequence, the entire input sequence is removed. All constant or mutable buffer sequences previously obtained using `data()` or `prepare()` are invalidated.
zh-hans	从输入序列的开头移除 `n` 个字节。如果 `n` 大于输入序列的大小，则移除整个输入序列。此前通过 `data()` 或 `prepare()` 获取的所有常量或可变缓冲区序列均会失效。

en	Models
zh-hans	模型

en	* [link beast.ref.boost__beast__basic_flat_buffer `basic_flat_buffer`] * [link beast.ref.boost__beast__basic_multi_buffer `basic_multi_buffer`] * [link beast.ref.boost__beast__flat_buffer `flat_buffer`] * [link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`] * [link beast.ref.boost__beast__flat_static_buffer_base `flat_static_buffer_base`] * [link beast.ref.boost__beast__static_buffer `static_buffer`] * [link beast.ref.boost__beast__static_buffer_base `static_buffer_base`] * [link beast.ref.boost__beast__multi_buffer `multi_buffer`]