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 13:31+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-04-http-04-serializer-streams-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
msgctxt "10"
msgid "Serializer Stream Operations"
msgstr "序列化器流操作"

#. type: paragraph
#: 12
msgid ""
"Non-trivial algorithms need to do more than send entire messages at once, "
"such as:"
msgstr ""
"非平凡算法需要执行的操作不仅限于一次性发送完整消息，该算法需要做更多的事，例"
"如："

#. type: list
#: 15
msgid "* Send the header first, and the body later."
msgstr "* 先发送头部，再发送消息体。"

#. type: list
#: 17
msgid "* Send a message incrementally: bounded work in each I/O cycle."
msgstr "* 逐步发送消息：每个 I/O 周期内执行有限的工作量。"

#. type: list
#: 19
msgid "* Use a series of caller-provided buffers to represent the body."
msgstr "* 使用调用方提供的一系列缓冲区来表示消息体。"

#. type: paragraph
#: 21
msgid ""
"These tasks may be performed by using the serializer stream interfaces. To "
"use these interfaces, first construct an appropriate serializer from the "
"message to be sent:"
msgstr ""
"这些任务可通过使用序列化器流接口来完成。使用这些接口时，首先从待发送的消息构"
"造相应的序列化器："

#. type: table title
#: 25
msgid "Serializer"
msgstr "序列化器"

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

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

#. type: table cell
#: 25
msgid "__serializer__"
msgstr "__序列化器__"

#. type: table code
#: 25
msgid ""
"/// Provides buffer oriented HTTP message serialization functionality.\n"
"template<\n"
"bool isRequest,\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"class serializer;"
msgstr ""
"/// 提供面向缓冲区的 HTTP 消息序列化功能。\n"
"template<\n"
"bool isRequest,\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"class serializer;"

#. type: table cell
#: 25
msgid ""
"[link beast.ref.boost__beast__http__request_serializer `request_serializer`]"
msgstr ""
"[link beast.ref.boost__beast__http__request_serializer `request_serializer`]"

#. type: table code
#: 25
msgid ""
"/// A serializer for HTTP/1 requests\n"
"template<\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"using request_serializer = serializer<true, Body, Fields>;"
msgstr ""
"/// HTTP/1 请求序列化器\n"
"template<\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"using request_serializer = serializer<true, Body, Fields>;"

#. type: table cell
#: 25
msgid ""
"[link beast.ref.boost__beast__http__response_serializer "
"`response_serializer`]"
msgstr ""
"[link beast.ref.boost__beast__http__response_serializer "
"`response_serializer`]"

#. type: table code
#: 25
msgid ""
"/// A serializer for HTTP/1 responses\n"
"template<\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"using response_serializer = serializer<false, Body, Fields>;"
msgstr ""
"/// HTTP/1 响应序列化器\n"
"template<\n"
"class Body,\n"
"class Fields = fields\n"
">\n"
"using response_serializer = serializer<false, Body, Fields>;"

#. type: paragraph
#: 66
msgid ""
"The choices for template types must match the message passed on "
"construction. This code creates an HTTP response and the corresponding "
"serializer:"
msgstr ""
"模板类型的选择必须与构造时传入的消息相匹配。以下代码用于创建一个 HTTP 响应及"
"其对应的序列化器："

#. type: paragraph
#: 71
msgid "The stream operations which work on serializers are:"
msgstr "用于操作序列化器的流操作如下："

#. type: table title
#: 73
msgctxt "73"
msgid "Serializer Stream Operations"
msgstr "序列化器流操作"

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

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

#. type: table cell
#: 73
msgid "[link beast.ref.boost__beast__http__write.overload1 [*write]]"
msgstr "[link beast.ref.boost__beast__http__write.overload1 [*write]]"

#. type: table cell
#: 73
msgid "Send everything in a __serializer__ to a __SyncWriteStream__."
msgstr "将 __serializer__ 中的全部数据发送到 __SyncWriteStream__。"

#. type: table cell
#: 73
msgid ""
"[link beast.ref.boost__beast__http__async_write.overload1 [*async_write]]"
msgstr ""
"[link beast.ref.boost__beast__http__async_write.overload1 [*async_write]]"

#. type: table cell
#: 73
msgid ""
"Send everything in a __serializer__ asynchronously to an "
"__AsyncWriteStream__."
msgstr "将 __serializer__ 中的全部数据异步发送到 __AsyncWriteStream__。"

#. type: table cell
#: 73
msgid ""
"[link beast.ref.boost__beast__http__write_header.overload1 [*write_header]]"
msgstr ""
"[link beast.ref.boost__beast__http__write_header.overload1 [*write_header]]"

#. type: table cell
#: 73
msgid "Send only the header from a __serializer__ to a __SyncWriteStream__."
msgstr "仅将 __serializer__ 中的头部发送到 __SyncWriteStream__。"

#. type: table cell
#: 73
msgid ""
"[link beast.ref.boost__beast__http__async_write_header [*async_write_header]]"
msgstr ""
"[link beast.ref.boost__beast__http__async_write_header [*async_write_header]]"

#. type: table cell
#: 73
msgid ""
"Send only the header from a __serializer__ asynchronously to an "
"__AsyncWriteStream__."
msgstr "仅将 __serializer__ 中的头部异步发送到 __AsyncWriteStream__。"

#. type: table cell
#: 73
msgid "[link beast.ref.boost__beast__http__write_some.overload1 [*write_some]]"
msgstr "[link beast.ref.boost__beast__http__write_some.overload1 [*write_some]]"

#. type: table cell
#: 73
msgid "Send part of a __serializer__ to a __SyncWriteStream__."
msgstr "将 __serializer__ 中的部分数据发送到 __SyncWriteStream__。"

#. type: table cell
#: 73
msgid ""
"[link beast.ref.boost__beast__http__async_write_some [*async_write_some]]"
msgstr ""
"[link beast.ref.boost__beast__http__async_write_some [*async_write_some]]"

#. type: table cell
#: 73
msgid ""
"Send part of a __serializer__ asynchronously to an __AsyncWriteStream__."
msgstr "将 __serializer__ 中的部分数据异步发送到 __AsyncWriteStream__。"

#. type: paragraph
#: 107
msgid ""
"Here is an example of using a serializer to send a message on a stream "
"synchronously. This performs the same operation as calling `write(stream, m)"
"`:"
msgstr ""
"以下示例演示如何使用序列化器在流上同步发送消息。其效果与直接调用 `write"
"(stream, m)` 相同："
