msgid ""
msgstr ""
"Project-Id-Version: Chinese (Simplified Han script) (Boost Beast Translation "
"(zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-06 20:29+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-03-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
#, fuzzy
msgctxt "10"
msgid "Message Stream Operations"
msgstr "Message Stream Operations"

#. type: paragraph
#: 12
#, fuzzy
msgid ""
"Beast provides synchronous and asynchronous algorithms to parse and "
"serialize HTTP/1 wire format messages on streams. These functions form the "
"message-oriented stream interface:"
msgstr ""
"Beast provides synchronous and asynchronous algorithms to parse and "
"serialize HTTP/1 wire format messages on streams. These functions form the "
"message-oriented stream interface:"

#. type: table title
#: 16
#, fuzzy
msgctxt "16"
msgid "Message Stream Operations"
msgstr "Message Stream Operations"

#. type: table cell
#: 16
#, fuzzy
msgid "Name"
msgstr "Name"

#. type: table cell
#: 16
#, fuzzy
msgid "Description"
msgstr "Description"

#. type: table cell
#: 16
#, fuzzy
msgid "[link beast.ref.boost__beast__http__read.overload3 [*read]]"
msgstr "[link beast.ref.boost__beast__http__read.overload3 [*read]]"

#. type: table cell
#: 16
#, fuzzy
msgid "Read a __message__ from a __SyncReadStream__."
msgstr "Read a __message__ from a __SyncReadStream__."

#. type: table cell
#: 16
#, fuzzy
msgid "[link beast.ref.boost__beast__http__async_read.overload2 [*async_read]]"
msgstr "[link beast.ref.boost__beast__http__async_read.overload2 [*async_read]]"

#. type: table cell
#: 16
#, fuzzy
msgid "Read a __message__ from an __AsyncReadStream__."
msgstr "Read a __message__ from an __AsyncReadStream__."

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

#. type: table cell
#: 16
#, fuzzy
msgid "Write a __message__ to a __SyncWriteStream__."
msgstr "Write a __message__ to a __SyncWriteStream__."

#. type: table cell
#: 16
#, fuzzy
msgid "[link beast.ref.boost__beast__http__async_write [*async_write]]"
msgstr "[link beast.ref.boost__beast__http__async_write [*async_write]]"

#. type: table cell
#: 16
#, fuzzy
msgid "Write a __message__ to an __AsyncWriteStream__."
msgstr "Write a __message__ to an __AsyncWriteStream__."

#. type: paragraph
#: 40
#, fuzzy
msgid ""
"All synchronous stream operations come in two varieties. One which throws an "
"exception upon error, and another which accepts as the last parameter an "
"argument of type [link beast.ref.boost__beast__error_code `error_code&`]. If "
"an error occurs this argument will be set to contain the error code."
msgstr ""
"All synchronous stream operations come in two varieties. One which throws an "
"exception upon error, and another which accepts as the last parameter an "
"argument of type [link beast.ref.boost__beast__error_code `error_code&`]. If "
"an error occurs this argument will be set to contain the error code."

#. type: heading
#: 47
#, fuzzy
msgid "Reading"
msgstr "Reading"

#. type: paragraph
#: 49
#, fuzzy
msgid ""
"Because a serialized header is not length-prefixed, algorithms which parse "
"messages from a stream may read past the end of a message for efficiency. To "
"hold this surplus data, all stream read operations use a passed-in "
"__DynamicBuffer__ which must be persisted between calls until the end of "
"stream is reached or the stream object is destroyed. Each read operation may "
"consume bytes remaining in the buffer, and leave behind new bytes. In this "
"example we declare the buffer and a message variable, then read a complete "
"HTTP request synchronously:"
msgstr ""
"Because a serialized header is not length-prefixed, algorithms which parse "
"messages from a stream may read past the end of a message for efficiency. To "
"hold this surplus data, all stream read operations use a passed-in "
"__DynamicBuffer__ which must be persisted between calls until the end of "
"stream is reached or the stream object is destroyed. Each read operation may "
"consume bytes remaining in the buffer, and leave behind new bytes. In this "
"example we declare the buffer and a message variable, then read a complete "
"HTTP request synchronously:"

#. type: paragraph
#: 60
#, fuzzy
msgid ""
"This example uses __flat_buffer__. Beast's __basic_parser__ is optimized for "
"structured HTTP data located in a single contiguous (['flat]) memory buffer. "
"When not using a flat buffer the implementation may perform an additional "
"memory allocations to restructure the input into a single buffer for parsing."
msgstr ""
"This example uses __flat_buffer__. Beast's __basic_parser__ is optimized for "
"structured HTTP data located in a single contiguous (['flat]) memory buffer. "
"When not using a flat buffer the implementation may perform an additional "
"memory allocations to restructure the input into a single buffer for parsing."

#. type: paragraph
#: 67
#, fuzzy
msgid "Other Implementations of __DynamicBuffer__ may avoid parser"
msgstr "Other Implementations of __DynamicBuffer__ may avoid parser"

#. type: paragraph
#: 72
#, fuzzy
msgid ""
"Messages may also be read asynchronously. When performing asynchronous "
"stream read operations the stream, buffer, and message variables must remain "
"valid until the operation has completed. Beast asynchronous initiation "
"functions use Asio's completion handler model. This call reads a message "
"asynchronously and reports the error code upon completion. The handler is "
"called with the error, set to any that occurs, and the number of bytes "
"parsed. This number may be used to measure the relative amount of work "
"performed, or it may be ignored as this example shows."
msgstr ""
"Messages may also be read asynchronously. When performing asynchronous "
"stream read operations the stream, buffer, and message variables must remain "
"valid until the operation has completed. Beast asynchronous initiation "
"functions use Asio's completion handler model. This call reads a message "
"asynchronously and reports the error code upon completion. The handler is "
"called with the error, set to any that occurs, and the number of bytes "
"parsed. This number may be used to measure the relative amount of work "
"performed, or it may be ignored as this example shows."

#. type: paragraph
#: 84
#, fuzzy
msgid ""
"If a read stream algorithm cannot complete its operation without exceeding "
"the maximum specified size of the dynamic buffer provided, the error [link "
"beast.ref.boost__beast__http__error `buffer_overflow`] is returned. This is "
"one technique which may be used to impose a limit on the maximum size of an "
"HTTP message header for protection from buffer overflow attacks. The "
"following code will print the error message:"
msgstr ""
"If a read stream algorithm cannot complete its operation without exceeding "
"the maximum specified size of the dynamic buffer provided, the error [link "
"beast.ref.boost__beast__http__error `buffer_overflow`] is returned. This is "
"one technique which may be used to impose a limit on the maximum size of an "
"HTTP message header for protection from buffer overflow attacks. The "
"following code will print the error message:"

#. type: heading
#: 95
#, fuzzy
msgid "Writing"
msgstr "Writing"

#. type: paragraph
#: 97
#, fuzzy
msgid ""
"A set of free functions allow serialization of an entire HTTP message to a "
"stream. This example constructs and sends an HTTP response:"
msgstr ""
"A set of free functions allow serialization of an entire HTTP message to a "
"stream. This example constructs and sends an HTTP response:"

#. type: paragraph
#: 102
#, fuzzy
msgid "The asynchronous version could be used instead:"
msgstr "The asynchronous version could be used instead:"

#. type: paragraph
#: 106
#, fuzzy
msgid ""
"The completion handler is called with the number of bytes written to the "
"stream, which includes protocol specific data such as the delimiters in the "
"header and line endings. The number may be used to measure the amount of "
"data transferred, or it may be ignored as in the example."
msgstr ""
"The completion handler is called with the number of bytes written to the "
"stream, which includes protocol specific data such as the delimiters in the "
"header and line endings. The number may be used to measure the amount of "
"data transferred, or it may be ignored as in the example."
