msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Beast Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-07-24 22:47+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Chinese (Simplified Han script) <https://"
"insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/"
"doc-qbk-03-core-5-buffers-qbk/zh_Hans/>\n"
"Language: zh_Hans\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
msgid "Buffer Types"
msgstr "缓冲区类型"

#. type: paragraph
#: 12
msgid ""
"To facilitate working with instances of the __ConstBufferSequence__ and "
"__MutableBufferSequence__ concepts introduced in __Asio__, Beast treats "
"those sequences as a special type of range. The following algorithms and "
"wrappers are provided which transform these ranges efficiently using lazy "
"evaluation. No memory allocations are used in the transformations; instead, "
"they create lightweight iterators over the existing, unmodified memory "
"buffers. Control of buffers is retained by the caller; ownership is not "
"transferred."
msgstr ""
"为方便处理 __Asio__ 中定义的 __ConstBufferSequence__ 和 "
"__MutableBufferSequence__ 这两种概念，Beast 将它们视为一种特殊的范围类型。该"
"库提供以下算法和包装器，采用延迟求值的方式对这类范围进行高效转换。转换时不会"
"分配内存，只是在已有且未修改的内存缓冲区上创建轻量级迭代器。缓冲区的控制权依"
"然属于调用方，不涉及所有权转移。"

#. type: table title
#: 21
msgctxt "21"
msgid "Buffer Algorithms and Types"
msgstr "缓冲区算法与类型"

#. type: table cell
#: 21
msgctxt "21"
msgid "Name"
msgstr "名称"

#. type: table cell
#: 21
msgctxt "21"
msgid "Description"
msgstr "描述"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffer_bytes `buffer_bytes`]"
msgstr "[link beast.ref.boost__beast__buffer_bytes `buffer_bytes`]"

#. type: table cell
#: 21
msgid ""
"This is a more reliable version of [@boost:/doc/html/boost_asio/reference/"
"buffer_size.html `net::buffer_size`] which is easier to use and also works "
"for types which are convertible to `net::const_buffer` or "
"`net::mutable_buffer`."
msgstr ""
"这是一个更可靠的 `net::buffer_size` 版本，使用起来更简单，并且适用于可转换为 "
"`net::const_buffer` 或 `net::mutable_buffer` 的类型。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_cat `buffers_cat`]"
msgstr "[link beast.ref.boost__beast__buffers_cat `buffers_cat`]"

#. type: table cell
#: 21
msgid ""
"This functions returns a new buffer sequence which, when iterated, traverses "
"the sequence which would be formed if all of the input buffer sequences were "
"concatenated. With this routine, multiple calls to a stream's `write_some` "
"function may be combined into one, eliminating expensive system calls."
msgstr ""
"该函数返回一个新的缓冲区序列，对该序列进行迭代遍历时，其效果相当于将所有输入"
"缓冲区序列拼接在一起。利用该例程，可以将对流 `write_some` 函数的多次调用合并"
"为一次，从而减少昂贵的系统调用。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_cat_view `buffers_cat_view`]"
msgstr "[link beast.ref.boost__beast__buffers_cat_view `buffers_cat_view`]"

#. type: table cell
#: 21
msgid ""
"This class represents the buffer sequence formed by concatenating two or "
"more buffer sequences. This is type of object returned by [link "
"beast.ref.boost__beast__buffers_cat `buffers_cat`]."
msgstr ""
"该类表示将两个或多个缓冲区序列拼接后形成的新缓冲区序列。该类型与 [link "
"beast.ref.boost__beast__buffers_cat `buffers_cat`] 返回的对象类型一致。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_front `buffers_front`]"
msgstr "[link beast.ref.boost__beast__buffers_front `buffers_front`]"

#. type: table cell
#: 21
msgid ""
"This function returns the first buffer in a buffer sequence, or a buffer of "
"size zero if the buffer sequence has no elements."
msgstr ""
"该函数用于返回缓冲区序列中的第一个缓冲区。如果该序列为空，则返回一个大小为零"
"的缓冲区。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_prefix `buffers_prefix`]"
msgstr "[link beast.ref.boost__beast__buffers_prefix `buffers_prefix`]"

#. type: table cell
#: 21
msgid ""
"This function returns a new buffer or buffer sequence which represents a "
"prefix of the original buffers."
msgstr "该函数用于返回一个代表原始缓冲区前缀的新缓冲区或缓冲区序列。"

#. type: table cell
#: 21
msgid ""
"[link beast.ref.boost__beast__buffers_prefix_view `buffers_prefix_view`]"
msgstr ""
"[link beast.ref.boost__beast__buffers_prefix_view `buffers_prefix_view`]"

#. type: table cell
#: 21
msgid ""
"This class represents the buffer sequence formed from a prefix of an "
"existing buffer sequence. This is the type of buffer returned by [link "
"beast.ref.boost__beast__buffers_prefix `buffers_prefix`]."
msgstr ""
"该类表示从现有缓冲区序列前缀中形成的新缓冲区序列。该类型与 [link "
"beast.ref.boost__beast__buffers_prefix `buffers_prefix`] 返回的缓冲区类型一致"
"。"

#. type: table cell
#: 21
msgid ""
"[link beast.ref.boost__beast__buffers_range `buffers_range`] [link "
"beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`]"
msgstr ""
"[link beast.ref.boost__beast__buffers_range `buffers_range`] [link "
"beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`]"

#. type: table cell
#: 21
msgid ""
"This function returns an iterable range representing the passed buffer "
"sequence. The values obtained when iterating the range will always be a "
"constant buffer, unless the underlying buffer sequence is mutable, in which "
"case the value obtained when iterating will be a mutable buffer. It is "
"intended as a notational convenience when writing a ['range-for] statement "
"over a buffer sequence.\n"
"\n"
"The function [link beast.ref.boost__beast__buffers_range_ref "
"`buffers_range`] maintains a copy of the buffer sequence, while [link "
"beast.ref.boost__beast__buffers_range_ref `buffers_range_ref`] maintains a "
"reference (in this case, the caller must ensure that the lifetime of the "
"referenced buffer sequence extends until the range object is destroyed)."
msgstr ""
"该函数用于返回一个表示所传入缓冲区序列的可迭代范围。迭代该范围时获取的值始终"
"为常量缓冲区，除非底层缓冲区序列是可变的，此时迭代获取的值将变为可变缓冲区。"
"该函数旨在为编写遍历缓冲区序列的 [范围 for] 语句提供便捷的语法表达。\n"
"\n"
"[link beast.ref.boost__beast__buffers_range `buffers_range`] 函数会保留缓冲区"
"序列的副本，而 [link beast.ref.boost__beast__buffers_range_ref "
"`buffers_range_ref`] 则只保留引用（此时调用方需确保被引用缓冲区序列的生命周期"
"延续到该范围对象销毁为止）。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_suffix `buffers_suffix`]"
msgstr "[link beast.ref.boost__beast__buffers_suffix `buffers_suffix`]"

#. type: table cell
#: 21
msgid ""
"This class wraps the underlying memory of an existing buffer sequence and "
"presents a suffix of the original sequence. The length of the suffix may be "
"progressively shortened. This lets callers work with sequential increments "
"of a buffer sequence."
msgstr ""
"该类用于包装现有缓冲区序列的底层内存，并呈现原始序列的一个后缀。该后缀的长度"
"可以逐步缩短，方便调用方按顺序逐步处理缓冲区序列中的内容。"

#. type: table cell
#: 21
msgid "[link beast.ref.boost__beast__buffers_to_string `buffers_to_string`]"
msgstr "[link beast.ref.boost__beast__buffers_to_string `buffers_to_string`]"

#. type: table cell
#: 21
msgid ""
"This function converts a buffer sequence to a `std::string`. It can be used "
"for diagnostic purposes and tests."
msgstr "该函数用于将缓冲区序列转换为 `std::string` 字符串，可用于诊断和测试场景。"

#. type: table cell
#: 21
msgid ""
"[link beast.ref.boost__beast__buffer_ref `buffer_ref`] [link "
"beast.ref.boost__beast__ref `ref`]"
msgstr ""
"[link beast.ref.boost__beast__buffer_ref `buffer_ref`] [link "
"beast.ref.boost__beast__ref `ref`]"

#. type: table cell
#: 21
msgid ""
"This function converts a beast buffer, that is to be passed by reference, "
"into a buffer reference, that can be passed by value into asio functions.\n"
"\n"
"It implements the __DynamicBuffer__v2__ concept."
msgstr ""
"该函数用于将通过引用传递的 Beast 缓冲区转换为可通过值传递给 Asio 函数的缓冲区"
"引用。该函数实现了 __DynamicBuffer__v2__ 概念。"

#. type: paragraph
#: 111
msgid ""
"The __DynamicBuffer__ concept introduced in __Asio__ models a buffer "
"sequence which supports an owning, resizable range. Beast provides this set "
"of additional implementations of the dynamic buffer concept:"
msgstr ""
"__Asio__ 中引入的 __DynamicBuffer__ 概念用于描述一种支持所有权且可调整大小的"
"缓冲区序列。Beast 提供以下一组动态缓冲区概念的补充实现："

#. type: table title
#: 115
msgid "Dynamic Buffer Implementations"
msgstr "动态缓冲区实现类型"

#. type: table cell
#: 115
msgctxt "115"
msgid "Name"
msgstr "名称"

#. type: table cell
#: 115
msgctxt "115"
msgid "Description"
msgstr "描述"

#. type: table cell
#: 115
msgid "[link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`]"
msgstr "[link beast.ref.boost__beast__buffers_adaptor `buffers_adaptor`]"

#. type: table cell
#: 115
msgid ""
"This wrapper adapts any __MutableBufferSequence__ into a __DynamicBuffer__ "
"with an upper limit on the total size of the input and output areas equal to "
"the size of the underlying mutable buffer sequence. The implementation does "
"not perform heap allocations."
msgstr ""
"该包装器用于将任意 __MutableBufferSequence__ 适配为 __DynamicBuffer__，其输入"
"与输出区域的总大小上限等于底层可变缓冲区序列的大小。该实现不进行堆内存分配。"

#. type: table cell
#: 115
msgid ""
"[link beast.ref.boost__beast__flat_buffer `flat_buffer`] [link "
"beast.ref.boost__beast__basic_flat_buffer `basic_flat_buffer`]"
msgstr ""
"[link beast.ref.boost__beast__flat_buffer `flat_buffer`] [link "
"beast.ref.boost__beast__basic_flat_buffer `basic_flat_buffer`]"

#. type: table cell
#: 115
msgid ""
"Guarantees that input and output areas are buffer sequences with length one. "
"Upon construction an optional upper limit to the total size of the input and "
"output areas may be set. The basic container is an [@https://"
"en.cppreference.com/w/cpp/named_req/AllocatorAwareContainer "
"[*AllocatorAwareContainer]]."
msgstr ""
"该类保证输入与输出区域均为长度为一的缓冲区序列。构造时可设置输入与输出区域总"
"大小的可选上限。该基本容器是一个 [@https://en.cppreference.com/w/cpp/"
"named_req/AllocatorAwareContainer [分配器感知容器]]。"

#. type: table cell
#: 115
msgid ""
"[link beast.ref.boost__beast__multi_buffer `multi_buffer`] [link "
"beast.ref.boost__beast__basic_multi_buffer `basic_multi_buffer`]"
msgstr ""
"[link beast.ref.boost__beast__multi_buffer `multi_buffer`] [link "
"beast.ref.boost__beast__basic_multi_buffer `basic_multi_buffer`]"

#. type: table cell
#: 115
msgid ""
"Uses a sequence of one or more character arrays of varying sizes. Additional "
"character array objects are appended to the sequence to accommodate changes "
"in the size of the character sequence. The basic container is an [@https://"
"en.cppreference.com/w/cpp/named_req/AllocatorAwareContainer "
"[*AllocatorAwareContainer]]."
msgstr ""
"该类使用一个或多个大小不同的字符数组构成的序列。当字符序列的大小发生变化时，"
"会向该序列中追加额外的字符数组对象。该基本容器是一个 [@https://"
"en.cppreference.com/w/cpp/named_req/AllocatorAwareContainer [分配器感知容"
"器]]。"

#. type: table cell
#: 115
msgid ""
"[link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`] [link "
"beast.ref.boost__beast__flat_static_buffer_base `flat_static_buffer_base`]"
msgstr ""
"[link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`] [link "
"beast.ref.boost__beast__flat_static_buffer_base `flat_static_buffer_base`]"

#. type: table cell
#: 115
msgid ""
"Guarantees that input and output areas are buffer sequences with length one. "
"Provides the facilities of a dynamic buffer, subject to an upper limit "
"placed on the total size of the input and output areas defined by a "
"constexpr template parameter. The storage for the sequences are kept in the "
"class; the implementation does not perform heap allocations."
msgstr ""
"该类保证输入与输出区域均为长度为一的缓冲区序列。它提供动态缓冲区的功能，但输"
"入与输出区域的总大小受模板常量表达式参数所定义的上限约束。该序列的存储空间保"
"存在类内部，实现不进行堆内存分配。"

#. type: table cell
#: 115
msgid ""
"[link beast.ref.boost__beast__static_buffer `static_buffer`] [link "
"beast.ref.boost__beast__static_buffer_base `static_buffer_base`]"
msgstr ""
"[link beast.ref.boost__beast__static_buffer `static_buffer`] [link "
"beast.ref.boost__beast__static_buffer_base `static_buffer_base`]"

#. type: table cell
#: 115
msgid ""
"Provides the facilities of a circular dynamic buffer. subject to an upper "
"limit placed on the total size of the input and output areas defined by a "
"constexpr template parameter. The implementation never moves memory during "
"buffer operations. The storage for the sequences are kept in the class; the "
"implementation does not perform heap allocations."
msgstr ""
"该类提供循环动态缓冲区的功能，输入与输出区域的总大小受模板常量表达式参数所定"
"义的上限约束。实现过程中不会移动缓冲区中的内存数据。该序列的存储空间保存在类"
"内部，实现不进行堆内存分配。"

#. type: paragraph
#: 170
msgid ""
"The buffers provide different guarantees regarding the allocated memory; "
"stable means that existing mutable and const_buffers obtained by calling "
"`data` or `prepare`, will remain valid."
msgstr ""
"这些缓冲区在内存分配方面提供不同的保证。“稳定”意味着通过调用 `data` 或 "
"`prepare` 获取的现有可变缓冲区和常量缓冲区将保持有效。"

#. type: paragraph
#: 173
msgid "Note that copies always requires a new call to `data` and `prepare`.`"
msgstr "请注意，拷贝操作始终需要重新调用 `data` 和 `prepare`。"

#. type: table title
#: 175
msgid "Memory stability"
msgstr "内存稳定性"

#. type: table cell
#: 175
msgctxt "175"
msgid "Name"
msgstr "名称"

#. type: table cell
#: 175
msgid "Allocation"
msgstr "内存分配"

#. type: table cell
#: 175
msgid "buffer sequence length"
msgstr "缓冲区序列长度"

#. type: table cell
#: 175
msgid "Max Size"
msgstr "最大容量"

#. type: table cell
#: 175
msgid "Movable"
msgstr "可移动语义"

#. type: table cell
#: 175
msgid "prepare/commit"
msgstr "数据准备与提交"

#. type: table cell
#: 175
msgid "consume"
msgstr "消耗"

#. type: table cell
#: 175
msgid "[link beast.ref.boost__beast__flat_buffer `flat_buffer`]"
msgstr "[link beast.ref.boost__beast__flat_buffer `flat_buffer`]"

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "dynamic"
msgstr ""

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "1"
msgstr ""

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "yes"
msgstr ""

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "invalidating"
msgstr ""

#. type: table cell
#: 175
msgid "[link beast.ref.boost__beast__multi_buffer `multi_buffer`]"
msgstr "[link beast.ref.boost__beast__multi_buffer `multi_buffer`]"

#. type: table cell
#: 175
msgid "stable"
msgstr "稳定的"

#. type: table cell
#: 175
msgid "[link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`]"
msgstr "[link beast.ref.boost__beast__flat_static_buffer `flat_static_buffer`]"

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "static"
msgstr ""

#. type: table cell
#.
#: 175
msgctxt "175"
msgid "no"
msgstr ""

#. type: table cell
#: 175
msgid "[link beast.ref.boost__beast__static_buffer `static_buffer`]"
msgstr "[link beast.ref.boost__beast__static_buffer `static_buffer`]"

#. type: table cell
#: 175
msgid "1-2"
msgstr "1-2"

#. type: table cell
#: 175
msgid "may invalidate"
msgstr "可能导致失效"

#. type: paragraph
#: 195
msgid ""
"These two functions facilitate buffer interoperability with standard output "
"streams."
msgstr "这两个函数用于促进缓冲区与标准输出流之间的互操作性。"

#. type: table title
#: 198
msgid "Buffer Output Streams"
msgstr "缓冲区输出流"

#. type: table cell
#: 198
msgctxt "198"
msgid "Name"
msgstr "名称"

#. type: table cell
#: 198
msgctxt "198"
msgid "Description"
msgstr "描述"

#. type: table cell
#: 198
msgid "[link beast.ref.boost__beast__make_printable `make_printable`]"
msgstr "[link beast.ref.boost__beast__make_printable `make_printable`]"

#. type: table cell
#: 198
msgid ""
"This function wraps a __ConstBufferSequence__ so it may be used with "
"`operator<<` and `std::ostream`."
msgstr ""
"该函数用于包装 __ConstBufferSequence__，使其能够与 `operator<<` 和 "
"`std::ostream` 配合使用。"

#. type: table cell
#: 198
msgid "[link beast.ref.boost__beast__ostream `ostream`]"
msgstr "[link beast.ref.boost__beast__ostream `ostream`]"

#. type: table cell
#: 198
msgid ""
"This function returns a `std::ostream` which wraps a dynamic buffer. "
"Characters sent to the stream using `operator<<` are stored in the dynamic "
"buffer."
msgstr ""
"该函数用于返回一个包装了动态缓冲区的 `std::ostream` 对象。通过 `operator<<` "
"发送到该流的字符会存储到动态缓冲区中。"

#. type: paragraph
#: 215
msgid ""
"These type traits are provided to facilitate writing compile-time "
"metafunctions which operate on buffers:"
msgstr "以下类型特征用于编写操作缓冲区的编译期元函数："

#. type: table title
#: 218
msgctxt "218"
msgid "Buffer Algorithms and Types"
msgstr "缓冲区算法与类型"

#. type: table cell
#: 218
msgctxt "218"
msgid "Name"
msgstr "名称"

#. type: table cell
#: 218
msgctxt "218"
msgid "Description"
msgstr "描述"

#. type: table cell
#: 218
msgid ""
"[link beast.ref.boost__beast__buffers_iterator_type `buffers_iterator_type`]"
msgstr ""
"[link beast.ref.boost__beast__buffers_iterator_type `buffers_iterator_type`]"

#. type: table cell
#: 218
msgid ""
"This metafunction is used to determine the type of iterator used by a "
"particular buffer sequence."
msgstr "该元函数用于确定某个缓冲区序列所使用的迭代器类型。"

#. type: table cell
#: 218
msgid "[link beast.ref.boost__beast__buffers_type `buffers_type`]"
msgstr "[link beast.ref.boost__beast__buffers_type `buffers_type`]"

#. type: table cell
#: 218
msgid ""
"This metafunction is used to determine the underlying buffer type for a list "
"of buffer sequence. The equivalent type of the alias will vary depending on "
"the template type argument."
msgstr ""
"该元函数用于确定缓冲区序列列表的底层缓冲区类型。该别名对应的具体类型会随模板"
"类型参数的不同而变化。"

#. type: table cell
#: 218
msgid ""
"[link beast.ref.boost__beast__is_const_buffer_sequence "
"`is_const_buffer_sequence`]"
msgstr ""
"[link beast.ref.boost__beast__is_const_buffer_sequence "
"`is_const_buffer_sequence`]"

#. type: table cell
#: 218
msgid ""
"This metafunction is used to determine if all of the specified types meet "
"the requirements of __ConstBufferSequence__. This type alias will be "
"`std::true_type` if each specified type meets the requirements, otherwise, "
"this type alias will be `std::false_type`."
msgstr ""
"该元函数用于判断所有指定类型是否都满足 __ConstBufferSequence__ 概念的要求。若"
"每个指定类型都满足要求，则该类型别名为 `std::true_type`；否则为 "
"`std::false_type`。"

#. type: table cell
#: 218
msgid ""
"[link beast.ref.boost__beast__is_mutable_buffer_sequence "
"`is_mutable_buffer_sequence`]"
msgstr ""
"[link beast.ref.boost__beast__is_mutable_buffer_sequence "
"`is_mutable_buffer_sequence`]"

#. type: table cell
#: 218
msgid ""
"This metafunction is used to determine if all of the specified types meet "
"the requirements of __MutableBufferSequence__. This type alias will be "
"`std::true_type` if each specified type meets the requirements, otherwise, "
"this type alias will be `std::false_type`."
msgstr ""
"该元函数用于判断所有指定类型是否都满足 __MutableBufferSequence__ 概念的要求。"
"若每个指定类型都满足要求，则该类型别名为 `std::true_type`；否则为 "
"`std::false_type`。"
