<?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.1" version="1.1">
  <file original="NoName" source-language="en" datatype="plaintext" target-language="zh_Hans">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="10">
        <source>Parser Stream Operations</source>
        <target state="translated">解析器流操作</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">10</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8ee1316cd32f0d92">
        <source>Non-trivial algorithms need to do more than receive entire messages at once, such as:</source>
        <target state="translated">非平凡算法需要执行的操作不仅限于一次性接收完整消息，该算法需要做更多事，例如：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">12</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="723d2b69e7409dfd">
        <source>* Receive the header first and body later.</source>
        <target state="translated">* 先接收头部，再接收消息体。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">16</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e1d8d7d84208e138">
        <source>* Receive a large body using a fixed-size buffer.</source>
        <target state="translated">* 使用固定大小缓冲区接收大型消息体。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">18</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b9029a7dd0226de9">
        <source>* Receive a message incrementally: bounded work in each I/O cycle.</source>
        <target state="translated">* 逐步接收消息：每个 I/O 周期内只处理有限的数据量。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">20</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="72b3dfba915ff286">
        <source>* Defer the commitment to a __Body__ type until after reading the header.</source>
        <target state="translated">* 在读取头部之后，再确定 __Body__ 类型。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4f68914c8d96d034">
        <source>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.</source>
        <target state="translated">这类操作要求调用方管理相关状态的生命周期，具体方式为构造一个派生自 __basic_parser__ 的类。Beast 提供派生类 __parser__，该类型使用 __basic_fields__ 字段容器来创建完整的 __message__ 对象。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">24</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="701ff1629bc46b4b">
        <source>Parser</source>
        <target state="translated">解析器</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="29">
        <source>Name</source>
        <target state="translated">名称</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="29">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ba07de56c71e1775">
        <source>__parser__</source>
        <target state="translated">__解析器__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d96adae71efe54b6">
        <source>/// An HTTP/1 parser for producing a message.
template&lt;
bool isRequest,                         // `true` to parse an HTTP request
class Body,                             // The Body type for the resulting message
class Allocator = std::allocator&lt;char&gt;&gt; // The type of allocator for the header
class parser
: public basic_parser&lt;...&gt;;</source>
        <target state="translated">/// 用于生成消息的 HTTP/1 解析器
template&lt;
bool isRequest,                         // 若为 true 则解析 HTTP 请求
class Body,                             // 结果消息的消息体
class Allocator = std::allocator&lt;char&gt;&gt; // 头部所使用的分配器
class parser
: public basic_parser&lt;...&gt;;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table code</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="96929b9d0f8e90fb">
        <source>[link beast.ref.boost__beast__http__request_parser `request_parser`]</source>
        <target state="translated">[link beast.ref.boost__beast__http__request_parser `request_parser`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2719d52232b73895">
        <source>/// An HTTP/1 parser for producing a request message.
template&lt;class Body, class Allocator = std::allocator&lt;char&gt;&gt;
using request_parser = parser&lt;true, Body, Allocator&gt;;</source>
        <target state="translated">/// 用于生成请求消息的 HTTP/1 解析器
template&lt;class Body, class Allocator = std::allocator&lt;char&gt;&gt;
using request_parser = parser&lt;true, Body, Allocator&gt;;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table code</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4c3943d5dc7f7401">
        <source>[link beast.ref.boost__beast__http__response_parser `response_parser`]</source>
        <target state="translated">[link beast.ref.boost__beast__http__response_parser `response_parser`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0179f6854c45841a">
        <source>/// An HTTP/1 parser for producing a response message.
template&lt;class Body, class Allocator = std::allocator&lt;char&gt;&gt;
using response_parser = parser&lt;false, Body, Allocator&gt;;</source>
        <target state="translated">/// 用于生成响应消息的 HTTP/1 解析器
template&lt;class Body, class Allocator = std::allocator&lt;char&gt;&gt;
using response_parser = parser&lt;false, Body, Allocator&gt;;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">29</context>
        </context-group>
        <note from="developer">type: table code</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="438d3f8de4547a1e">
        <source>The __basic_parser__ and classes derived from it handle octet streams</source>
        <target state="translated">__basic_parser__ 及其派生类用于处理八位字节流。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">65</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c758cc47d6139d60">
        <source>The stream operations which work on parsers are:</source>
        <target state="translated">用于操作解析器的流操作如下：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">69</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="71">
        <source>Parser Stream Operations</source>
        <target state="translated">解析器流操作</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="71">
        <source>Name</source>
        <target state="translated">名称</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="71">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="577d8ba334eb4425">
        <source>[link beast.ref.boost__beast__http__read.overload1 [*read]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__read.overload1 [*read]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="030592abeef72f0a">
        <source>Read everything into a parser from a __SyncReadStream__.</source>
        <target state="translated">从 __SyncReadStream__ 读取所有数据到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="909e1c9ac78e556c">
        <source>[link beast.ref.boost__beast__http__async_read.overload1 [*async_read]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__async_read.overload1 [*async_read]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c9464d525d230777">
        <source>Read everything into a parser asynchronously from an __AsyncReadStream__.</source>
        <target state="translated">从 __AsyncReadStream__ 异步读取所有数据到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="82cbd8ce5855d3d1">
        <source>[link beast.ref.boost__beast__http__read_header.overload1 [*read_header]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__read_header.overload1 [*read_header]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7ae591ab7b81b2c6">
        <source>Read only the header octets into a parser from a __SyncReadStream__.</source>
        <target state="translated">从 __SyncReadStream__ 仅读取头部八位字节到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="fc8d8b2f7d27acbc">
        <source>[link beast.ref.boost__beast__http__async_read_header [*async_read_header]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__async_read_header [*async_read_header]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="775c594d34b972d5">
        <source>Read only the header octets into a parser asynchronously from an __AsyncReadStream__.</source>
        <target state="translated">从 __AsyncReadStream__ 异步仅读取头部八位字节到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="585630bf479d1309">
        <source>[link beast.ref.boost__beast__http__read_some.overload1 [*read_some]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__read_some.overload1 [*read_some]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0f5558e0b21eef7a">
        <source>Read some octets into a parser from a __SyncReadStream__.</source>
        <target state="translated">从 __SyncReadStream__ 读取部分八位字节到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1166ef1d51010126">
        <source>[link beast.ref.boost__beast__http__async_read_some [*async_read_some]]</source>
        <target state="translated">[link beast.ref.boost__beast__http__async_read_some [*async_read_some]]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6b5867285defe3a8">
        <source>Read some octets into a parser asynchronously from an __AsyncReadStream__.</source>
        <target state="translated">从 __AsyncReadStream__ 异步读取部分八位字节到解析器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">71</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="dbb34a7548f2545a">
        <source>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.</source>
        <target state="translated">与消息流操作类似，解析器流操作也需要一个持久的 DynamicBuffer 来保存流中未使用的八位字节。当动态缓冲区使用单个连续内存块存储输入序列时，基本解析器实现能达到最优性能。因此，建议使用 flat_buffer、flat_static_buffer 或 flat_static_buffer_base 的实例；当然，用户自定义的 DynamicBuffer 实现，只要它能生成长度为 1 的输入序列，也同样适用。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">105</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e6248c896868b1f8">
        <source>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:</source>
        <target state="translated">解析器内部包含一个已构造的消息对象。传入解析器构造函数的参数会转发到消息容器中。调用方可通过 [link beast.ref.boost__beast__http__parser.get `parser::get`] 访问该消息。若 `Fields` 和 `Body` 类型支持移动构造，调用方还可通过 [link beast.ref.boost__beast__http__parser.release `parser::release`] 获取消息的所有权。以下示例使用解析器读取一个包含字符串消息体的 HTTP 响应，并将其打印出来：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">114</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b2324b160b2c5d94">
        <source>Incremental Read __example__</source>
        <target state="translated">增量读取 __示例__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">128</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="789a9c726569f298">
        <source>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:</source>
        <target state="translated">该函数使用 [link beast.ref.boost__beast__http__buffer_body `buffer_body`] 和解析器流操作，通过一个固定大小的小缓冲区逐步读取消息体：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">130</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="78e0069180c49a4a">
        <source>Reading large response body __example__</source>
        <target state="translated">读取大型响应消息体 __示例__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">141</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="98c147bfe7231fad">
        <source>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.</source>
        <target state="translated">本示例展示如何提高响应消息体大小的默认限制，以便读取超过默认 8MB 大小的内容。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">143</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
