msgid ""
msgstr ""
"Project-Id-Version: English (Boost Beast Translation (zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-06 19:15+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English <https://insights.cppalliance.org/weblate/projects/"
"boost-beast-documentation-zh_Hans/doc-qbk-04-http-05-parser-streams-qbk/en/>"
"\n"
"Language: en\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
"X-Generator: Weblate 2026.5\n"

#. type: section title
#: 10
#, read-only
msgctxt "10"
msgid "Parser Stream Operations"
msgstr "Parser Stream Operations"

#. type: paragraph
#: 12
#, read-only
msgid ""
"Non-trivial algorithms need to do more than receive entire messages at once, "
"such as:"
msgstr ""
"Non-trivial algorithms need to do more than receive entire messages at once, "
"such as:"

#. type: list
#: 16
#, read-only
msgid "* Receive the header first and body later."
msgstr "* Receive the header first and body later."

#. type: list
#: 18
#, read-only
msgid "* Receive a large body using a fixed-size buffer."
msgstr "* Receive a large body using a fixed-size buffer."

#. type: list
#: 20
#, read-only
msgid "* Receive a message incrementally: bounded work in each I/O cycle."
msgstr "* Receive a message incrementally: bounded work in each I/O cycle."

#. type: list
#: 22
#, read-only
msgid ""
"* Defer the commitment to a __Body__ type until after reading the header."
msgstr ""
"* Defer the commitment to a __Body__ type until after reading the header."

#. type: paragraph
#: 24
#, read-only
msgid ""
"These types of operations require callers to manage the lifetime of "
"associated state, by constructing a class derived from __basic_parser__. "
"Beast comes with the derived instance __parser__ which creates complete "
"__message__ objects using the __basic_fields__ Fields container."
msgstr ""
"These types of operations require callers to manage the lifetime of "
"associated state, by constructing a class derived from __basic_parser__. "
"Beast comes with the derived instance __parser__ which creates complete "
"__message__ objects using the __basic_fields__ Fields container."

#. type: table title
#: 29
#, read-only
msgid "Parser"
msgstr "Parser"

#. type: table cell
#: 29
#, read-only
msgctxt "29"
msgid "Name"
msgstr "Name"

#. type: table cell
#: 29
#, read-only
msgctxt "29"
msgid "Description"
msgstr "Description"

#. type: table cell
#: 29
#, read-only
msgid "__parser__"
msgstr "__parser__"

#. type: table code
#: 29
#, read-only
msgid ""
"/// An HTTP/1 parser for producing a message.\n"
"template<\n"
"bool isRequest,                         // `true` to parse an HTTP request\n"
"class Body,                             // The Body type for the resulting "
"message\n"
"class Allocator = std::allocator<char>> // The type of allocator for the "
"header\n"
"class parser\n"
": public basic_parser<...>;"
msgstr ""
"/// An HTTP/1 parser for producing a message.\n"
"template<\n"
"bool isRequest,                         // `true` to parse an HTTP request\n"
"class Body,                             // The Body type for the resulting "
"message\n"
"class Allocator = std::allocator<char>> // The type of allocator for the "
"header\n"
"class parser\n"
": public basic_parser<...>;"

#. type: table cell
#: 29
#, read-only
msgid "[link beast.ref.boost__beast__http__request_parser `request_parser`]"
msgstr "[link beast.ref.boost__beast__http__request_parser `request_parser`]"

#. type: table code
#: 29
#, read-only
msgid ""
"/// An HTTP/1 parser for producing a request message.\n"
"template<class Body, class Allocator = std::allocator<char>>\n"
"using request_parser = parser<true, Body, Allocator>;"
msgstr ""
"/// An HTTP/1 parser for producing a request message.\n"
"template<class Body, class Allocator = std::allocator<char>>\n"
"using request_parser = parser<true, Body, Allocator>;"

#. type: table cell
#: 29
#, read-only
msgid "[link beast.ref.boost__beast__http__response_parser `response_parser`]"
msgstr "[link beast.ref.boost__beast__http__response_parser `response_parser`]"

#. type: table code
#: 29
#, read-only
msgid ""
"/// An HTTP/1 parser for producing a response message.\n"
"template<class Body, class Allocator = std::allocator<char>>\n"
"using response_parser = parser<false, Body, Allocator>;"
msgstr ""
"/// An HTTP/1 parser for producing a response message.\n"
"template<class Body, class Allocator = std::allocator<char>>\n"
"using response_parser = parser<false, Body, Allocator>;"

#. type: paragraph
#: 65
#, read-only
msgid "The __basic_parser__ and classes derived from it handle octet streams"
msgstr "The __basic_parser__ and classes derived from it handle octet streams"

#. type: paragraph
#: 69
#, read-only
msgid "The stream operations which work on parsers are:"
msgstr "The stream operations which work on parsers are:"

#. type: table title
#: 71
#, read-only
msgctxt "71"
msgid "Parser Stream Operations"
msgstr "Parser Stream Operations"

#. type: table cell
#: 71
#, read-only
msgctxt "71"
msgid "Name"
msgstr "Name"

#. type: table cell
#: 71
#, read-only
msgctxt "71"
msgid "Description"
msgstr "Description"

#. type: table cell
#: 71
#, read-only
msgid "[link beast.ref.boost__beast__http__read.overload1 [*read]]"
msgstr "[link beast.ref.boost__beast__http__read.overload1 [*read]]"

#. type: table cell
#: 71
#, read-only
msgid "Read everything into a parser from a __SyncReadStream__."
msgstr "Read everything into a parser from a __SyncReadStream__."

#. type: table cell
#: 71
#, read-only
msgid "[link beast.ref.boost__beast__http__async_read.overload1 [*async_read]]"
msgstr "[link beast.ref.boost__beast__http__async_read.overload1 [*async_read]]"

#. type: table cell
#: 71
#, read-only
msgid ""
"Read everything into a parser asynchronously from an __AsyncReadStream__."
msgstr ""
"Read everything into a parser asynchronously from an __AsyncReadStream__."

#. type: table cell
#: 71
#, read-only
msgid ""
"[link beast.ref.boost__beast__http__read_header.overload1 [*read_header]]"
msgstr ""
"[link beast.ref.boost__beast__http__read_header.overload1 [*read_header]]"

#. type: table cell
#: 71
#, read-only
msgid "Read only the header octets into a parser from a __SyncReadStream__."
msgstr "Read only the header octets into a parser from a __SyncReadStream__."

#. type: table cell
#: 71
#, read-only
msgid ""
"[link beast.ref.boost__beast__http__async_read_header [*async_read_header]]"
msgstr ""
"[link beast.ref.boost__beast__http__async_read_header [*async_read_header]]"

#. type: table cell
#: 71
#, read-only
msgid ""
"Read only the header octets into a parser asynchronously from an "
"__AsyncReadStream__."
msgstr ""
"Read only the header octets into a parser asynchronously from an "
"__AsyncReadStream__."

#. type: table cell
#: 71
#, read-only
msgid "[link beast.ref.boost__beast__http__read_some.overload1 [*read_some]]"
msgstr "[link beast.ref.boost__beast__http__read_some.overload1 [*read_some]]"

#. type: table cell
#: 71
#, read-only
msgid "Read some octets into a parser from a __SyncReadStream__."
msgstr "Read some octets into a parser from a __SyncReadStream__."

#. type: table cell
#: 71
#, read-only
msgid "[link beast.ref.boost__beast__http__async_read_some [*async_read_some]]"
msgstr "[link beast.ref.boost__beast__http__async_read_some [*async_read_some]]"

#. type: table cell
#: 71
#, read-only
msgid ""
"Read some octets into a parser asynchronously from an __AsyncReadStream__."
msgstr ""
"Read some octets into a parser asynchronously from an __AsyncReadStream__."

#. type: paragraph
#: 105
#, read-only
msgid ""
"As with message stream operations, parser stream operations require a "
"persisted __DynamicBuffer__  for holding unused octets from the stream. The "
"basic parser implementation is optimized for the case where this dynamic "
"buffer stores its input sequence in a single contiguous memory buffer. It is "
"advised to use an instance of __flat_buffer__, __flat_static_buffer__, or "
"__flat_static_buffer_base__ for this purpose, although a user defined "
"instance of __DynamicBuffer__ which produces input sequences of length one "
"is also suitable."
msgstr ""
"As with message stream operations, parser stream operations require a "
"persisted __DynamicBuffer__  for holding unused octets from the stream. The "
"basic parser implementation is optimized for the case where this dynamic "
"buffer stores its input sequence in a single contiguous memory buffer. It is "
"advised to use an instance of __flat_buffer__, __flat_static_buffer__, or "
"__flat_static_buffer_base__ for this purpose, although a user defined "
"instance of __DynamicBuffer__ which produces input sequences of length one "
"is also suitable."

#. type: paragraph
#: 114
#, read-only
msgid ""
"The parser contains a message constructed internally. Arguments passed to "
"the parser's constructor are forwarded into the message container. The "
"caller can access the message inside the parser by calling [link "
"beast.ref.boost__beast__http__parser.get `parser::get`]. If the `Fields` and "
"`Body` types are [*MoveConstructible], the caller can take ownership of the "
"message by calling [link beast.ref.boost__beast__http__parser.release "
"`parser::release`]. In this example we read an HTTP response with a string "
"body using a parser, then print the response:"
msgstr ""
"The parser contains a message constructed internally. Arguments passed to "
"the parser's constructor are forwarded into the message container. The "
"caller can access the message inside the parser by calling [link "
"beast.ref.boost__beast__http__parser.get `parser::get`]. If the `Fields` and "
"`Body` types are [*MoveConstructible], the caller can take ownership of the "
"message by calling [link beast.ref.boost__beast__http__parser.release "
"`parser::release`]. In this example we read an HTTP response with a string "
"body using a parser, then print the response:"

#. type: section title
#: 128
#, read-only
msgid "Incremental Read __example__"
msgstr "Incremental Read __example__"

#. type: paragraph
#: 130
#, read-only
msgid ""
"This function uses [link beast.ref.boost__beast__http__buffer_body "
"`buffer_body`] and parser stream operations to read a message body "
"progressively using a small, fixed-size buffer:"
msgstr ""
"This function uses [link beast.ref.boost__beast__http__buffer_body "
"`buffer_body`] and parser stream operations to read a message body "
"progressively using a small, fixed-size buffer:"

#. type: section title
#: 141
#, read-only
msgid "Reading large response body __example__"
msgstr "Reading large response body __example__"

#. type: paragraph
#: 143
#, read-only
msgid ""
"This example presents how to increase the default limit of the response body "
"size, thus the content larger than the default 8MB can be read."
msgstr ""
"This example presents how to increase the default limit of the response body "
"size, thus the content larger than the default 8MB can be read."
