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-25 11:05+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--http-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 "HTTP"
msgstr "HTTP"

#. type: paragraph
#: 13
msgid "Higher level functions such as Basic"
msgstr "像 Basic 这类更高层级的函数"

#. type: paragraph
#: 20
msgid ""
"This library offers programmers simple and performant models of HTTP "
"messages and their associated operations including synchronous, "
"asynchronous, and buffer-oriented parsing and serialization of messages in "
"the HTTP/1 wire format using __Asio__. Specifically, the library provides:"
msgstr ""
"该库为程序员提供简洁高效的 HTTP 消息模型及其相关操作，包括使用 __Asio__ 对 "
"HTTP/1 线路格式的消息进行同步、异步及面向缓冲区的解析与序列化。具体功能如下："

#. type: variablelist cell
#: 25
msgid "Stream Reading"
msgstr "Stream Reading"

#. type: variablelist cell
#: 25
msgid ""
"The functions [link beast.ref.boost__beast__http__read `read`], [link "
"beast.ref.boost__beast__http__read_header `read_header`], [link "
"beast.ref.boost__beast__http__read_some `read_some`], [link "
"beast.ref.boost__beast__http__async_read `async_read`], [link "
"beast.ref.boost__beast__http__async_read_header `async_read_header`], and "
"[link beast.ref.boost__beast__http__async_read_some `async_read_some`] read "
"HTTP/1 message data from a [link beast.concepts.streams stream]."
msgstr ""
"[link beast.ref.boost__beast__http__read `read`]、[link "
"beast.ref.boost__beast__http__read_header `read_header`]、[link "
"beast.ref.boost__beast__http__read_some `read_some`]、[link "
"beast.ref.boost__beast__http__async_read `async_read`]、[link "
"beast.ref.boost__beast__http__async_read_header `async_read_header`] 以及 "
"[link beast.ref.boost__beast__http__async_read_some `async_read_some`] 这些函"
"数用于从 [link beast.concepts.streams 流] 中读取 HTTP/1 消息数据。"

#. type: variablelist cell
#: 25
msgid "Stream Writing"
msgstr "流式写入操作"

#. type: variablelist cell
#: 25
msgid ""
"The functions [link beast.ref.boost__beast__http__write `write`], [link "
"beast.ref.boost__beast__http__write_header `write_header`], [link "
"beast.ref.boost__beast__http__write_some `write_some`], [link "
"beast.ref.boost__beast__http__async_write `async_write`], [link "
"beast.ref.boost__beast__http__async_write_header `async_write_header`], and "
"[link beast.ref.boost__beast__http__async_write_some `async_write_some`] "
"write HTTP/1 message data to a [link beast.concepts.streams stream]."
msgstr ""
"[link beast.ref.boost__beast__http__write `write`]、[link "
"beast.ref.boost__beast__http__write_header `write_header`]、[link "
"beast.ref.boost__beast__http__write_some `write_some`]、[link "
"beast.ref.boost__beast__http__async_write `async_write`]、[link "
"beast.ref.boost__beast__http__async_write_header `async_write_header`] 以及 "
"[link beast.ref.boost__beast__http__async_write_some `async_write_some`] 这些"
"函数用于将 HTTP/1 消息数据写入到 [link beast.concepts.streams 流] 中。"

#. type: variablelist cell
#: 25
msgid "Serialization"
msgstr "序列化"

#. type: variablelist cell
#: 25
msgid ""
"The __serializer__ produces a series of octet buffers conforming to the "
"__rfc7230__ wire representation of a __message__."
msgstr ""
"__serializer__ 用于生成与 __message__ 的 __rfc7230__ 线路表示形式相一致的八位"
"字节缓冲区序列。"

#. type: variablelist cell
#: 25
msgid "Parsing"
msgstr "解析"

#. type: variablelist cell
#: 25
msgid ""
"The __parser__ attempts to convert a series of octet buffers into a "
"__message__."
msgstr "__parser__ 用于尝试将一系列八位字节缓冲区转换为 __message__。"

#. type: paragraph
#: 74
msgid ""
"Interfaces for operating on HTTP messages are structured into several "
"layers. The highest level provides ease of use, while lower levels provide "
"progressively more control, options, and flexibility. At the lowest level "
"customization points are provided, where user defined types can replace "
"parts of the implementation. The layers are arranged thusly:"
msgstr ""
"操作 HTTP 消息的接口分为多个层次。最高层接口注重易用性，越往下层，提供的控制"
"能力、可配置选项和灵活性就越强。最底层提供定制点，允许用户用自定义类型替换部"
"分内部实现。各层组织方式如下："

#. type: table cell
#: 80
msgid "[*6]"
msgstr "[*6]"

#. type: table cell
#: 80
msgid "__message__"
msgstr "__消息__"

#. type: table cell
#: 80
msgid ""
"At the highest level, these free functions send or receive a complete HTTP "
"message in one call. They are designed for ease of use: [link "
"beast.ref.boost__beast__http__read.overload4 `read`], [link "
"beast.ref.boost__beast__http__write.overload4 `write`], [link "
"beast.ref.boost__beast__http__async_read.overload2 `async_read`], and [link "
"beast.ref.boost__beast__http__async_write.overload2 `async_write`]."
msgstr ""
"最顶层接口通过一次函数调用即可完成完整 HTTP 消息的发送或接收，旨在简化使用。"
"相关函数包括：[link beast.ref.boost__beast__http__read.overload4 "
"`read`]、[link beast.ref.boost__beast__http__write.overload4 `write`]、[link "
"beast.ref.boost__beast__http__async_read.overload2 `async_read`] 以及 [link "
"beast.ref.boost__beast__http__async_write.overload2 `async_write`]。"

#. type: table cell
#: 80
msgid "[*5]"
msgstr "[*5]"

#. type: table cell
#: 80
msgid "__parser__, __serializer__"
msgstr "__解析器__, __序列化器__"

#. type: table cell
#: 80
msgid ""
"For more control, callers may take responsibility for managing the required "
"__parser__ or __serializer__ transient state objects. This allows additional "
"configuration such as limiting the number of bytes for message components "
"during parsing, or regulating the size of buffers emitted during output. "
"These functions send or receive complete messages using a serializer or "
"parser: [link beast.ref.boost__beast__http__read.overload2 `read`], [link "
"beast.ref.boost__beast__http__write.overload2 `write`], [link "
"beast.ref.boost__beast__http__async_read.overload1 `async_read`], and [link "
"beast.ref.boost__beast__http__async_write.overload1 `async_write`]."
msgstr ""
"若需更多控制权，调用方可以自行管理所需的 __parser__ 或 __serializer__ 临时状"
"态对象。这样便可以实现额外配置，例如在解析过程中限制消息组件的最大字节数，或"
"控制输出时缓冲区的大小。以下函数通过使用解析器或序列化器来发送或接收完整消息"
"：[link beast.ref.boost__beast__http__read.overload2 `read`]、[link "
"beast.ref.boost__beast__http__write.overload2 `write`]、[link "
"beast.ref.boost__beast__http__async_read.overload1 `async_read`] 以及 [link "
"beast.ref.boost__beast__http__async_write.overload1 `async_write`]。"

#. type: table cell
#: 80
msgid "[*4]"
msgstr "[*4]"

#. type: table cell
#: 80
msgid "__header__"
msgstr "__头部__"

#. type: table cell
#: 80
msgid ""
"Sometimes it is necessary to first send or receive the HTTP header. For "
"example, to read the header and take action before continuing to read the "
"body. These functions use a __parser__ or __serializer__ to read or write "
"the header: [link beast.ref.boost__beast__http__read_header.overload2 "
"`read_header`], [link beast.ref.boost__beast__http__write_header.overload2 "
"`write_header`], [link beast.ref.boost__beast__http__async_read_header "
"`async_read_header`], and [link "
"beast.ref.boost__beast__http__async_write_header `async_write_header`]."
msgstr ""
"有时需要先发送或接收 HTTP 头部，例如在读取头部后根据其内容决定后续操作，然后"
"再继续读取消息体。以下函数使用 __parser__ 或 __serializer__ 来读取或写入头部"
"：[link beast.ref.boost__beast__http__read_header.overload2 "
"`read_header`]、[link beast.ref.boost__beast__http__write_header.overload2 "
"`write_header`]、[link beast.ref.boost__beast__http__async_read_header "
"`async_read_header`] 以及 [link "
"beast.ref.boost__beast__http__async_write_header `async_write_header`]。"

#. type: table cell
#: 80
msgid "[*3]"
msgstr "[*3]"

#. type: table cell
#: 80
msgid "partial __message__"
msgstr "部分 __消息__"

#. type: table cell
#: 80
msgid ""
"All of the stream operations at higher levels thus far have operated on a "
"complete header or message. At this level it is possible to send and receive "
"messages incrementally. This allows resource constrained implementations to "
"perform work bounded on storage, or allows better control when setting "
"timeouts for example. These functions read or write bounded amounts of data "
"and return the number of bytes transacted: [link "
"beast.ref.boost__beast__http__read_some.overload2 `read_some`], [link "
"beast.ref.boost__beast__http__write_some.overload2 `write_some`], [link "
"beast.ref.boost__beast__http__async_read_some `async_read_some`], and [link "
"beast.ref.boost__beast__http__async_write_some `async_write_some`]."
msgstr ""
"到目前为止，所有较高层次的流操作都针对完整的消息头部或完整消息进行。而在此层"
"次，则可以实现消息的增量式发送与接收。这对资源受限的实现特别有用，可以在有限"
"的存储空间内完成任务，或在设置超时等场景下提供更精细的控制。以下函数用于读取"
"或写入限定量的数据，并返回实际传输的字节数：[link "
"beast.ref.boost__beast__http__read_some.overload2 `read_some`]、[link "
"beast.ref.boost__beast__http__write_some.overload2 `write_some`]、[link "
"beast.ref.boost__beast__http__async_read_some `async_read_some`] 以及 [link "
"beast.ref.boost__beast__http__async_write_some `async_write_some`]。"

#. type: table cell
#: 80
msgid "[*2]"
msgstr "[*2]"

#. type: table cell
#: 80
msgid "[@https://tools.ietf.org/html/rfc7230#section-4.1 ['chunked-body]]"
msgstr "[@https://tools.ietf.org/html/rfc7230#section-4.1 ['chunked-body]]"

#. type: table cell
#: 80
msgid ""
"Until now parse and serialize operations apply or remove the chunked "
"transfer coding as needed for message payloads whose size is not known ahead "
"of time. For some domain specific niches, it is necessary to assume direct "
"control over incoming or outgoing chunks in a chunk encoded message payload. "
"For parsing this is achieved by setting hooks using the functions [link "
"beast.ref.boost__beast__http__parser.on_chunk_header `on_chunk_header`] and/"
"or [link beast.ref.boost__beast__http__parser.on_chunk_body "
"`on_chunk_body`]. For serializing callers may first emit the header, and "
"then use these buffer sequence adapters to control the contents of each "
"chunk including [@https://tools.ietf.org/html/rfc7230#section-4.1.1 ['chunk "
"extensions]] and the [@https://tools.ietf.org/html/rfc7230#section-4.1.2 "
"['trailer-part]]: [link beast.ref.boost__beast__http__chunk_body "
"`chunk_body`], [link beast.ref.boost__beast__http__chunk_crlf `chunk_crlf`], "
"[link beast.ref.boost__beast__http__chunk_header `chunk_header`], and [link "
"beast.ref.boost__beast__http__chunk_last `chunk_last`]."
msgstr ""
"到目前为止，解析和序列化操作会根据需要自动对消息体应用或移除分块传输编码。但"
"在某些特定领域，需要对分块编码的消息体中的传入或传出数据块进行直接控制。在解"
"析端，可以通过设置钩子来实现：使用 [link "
"beast.ref.boost__beast__http__parser.on_chunk_header `on_chunk_header`] 和/"
"或 [link beast.ref.boost__beast__http__parser.on_chunk_body `on_chunk_body`] "
"函数。在序列化端，调用方可以先发送消息头部，然后使用以下缓冲区序列适配器来控"
"制每个数据块的内容，包括分块扩展和尾部部分：[link "
"beast.ref.boost__beast__http__chunk_body `chunk_body`]、[link "
"beast.ref.boost__beast__http__chunk_crlf `chunk_crlf`]、[link "
"beast.ref.boost__beast__http__chunk_header `chunk_header`] 以及 [link "
"beast.ref.boost__beast__http__chunk_last `chunk_last`]。"

#. type: table cell
#: 80
msgid "[*1]"
msgstr "[*1]"

#. type: table cell
#: 80
msgid "buffers"
msgstr "缓冲区"

#. type: table cell
#: 80
msgid ""
"For ultimate control, the use of library stream algorithms may be bypassed "
"entirely and instead work directly with buffers by calling members of "
"__parser__ or __serializer__."
msgstr ""
"若需最高级别的控制，可以完全绕过库的流算法，直接通过调用 __parser__ 或 "
"__serializer__ 的成员函数来操作缓冲区。"

#. type: table cell
#: 80
msgid "[*0]"
msgstr "[*0]"

#. type: table cell
#: 80
msgid "['user-defined]"
msgstr "['user-defined]"

#. type: table cell
#: 80
msgid ""
"In addition to the typical customization points of __Stream__ and "
"__DynamicBuffer__, user-defined types may replace parts of the library "
"implementation at the lowest level. The customization points include "
"__Fields__ for creating a container to store HTTP fields, __Body__ for "
"defining containers and algorithms used for HTTP message payloads, and user-"
"defined subclasses of __basic_parser__ for implementing custom message "
"representation strategies."
msgstr ""
"除了常见的 __Stream__ 和 __DynamicBuffer__ 定制点外，用户自定义类型还可以在最"
"底层替换库实现的部分组件。这些定制点包括：用于创建存储 HTTP 字段容器的 "
"__Fields__、用于定义 HTTP 消息体容器及相关算法的 __Body__，以及用于实现自定义"
"消息表示策略的 __basic_parser__ 子类。"

#. type: paragraph
#: 193
msgid "This documentation assumes some familiarity with __Asio__ and"
msgstr "本文档假定读者已具备一定的 Asio 使用经验，并"
