<?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="3e10e202825b1fc4">
        <source>Custom Parsers</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="ad1a1442a38251e5">
        <source>While the parsers included in the library will handle a broad number of use-cases, the __basic_parser__ interface can be subclassed to implement custom strategies for storing parsed results: the basic parser processes input buffers into elements according to the HTTP/1 protocol specification, while the derived class decides what to do with those elements. Custom parsers will work with all of the HTTP stream read algorithms, as those algorithms use only the basic parser interface. Some use cases for implementing custom parsers are:</source>
        <target state="translated">虽然库自带的解析器能覆盖大部分常见场景，但通过继承 __basic_parser__ 接口，也可以实现自定义的解析结果存储策略。基本解析器负责按 HTTP/1 协议规范将输入缓冲区解析为各个元素，而派生类则决定如何处理这些元素。由于所有 HTTP 流读取算法都只依赖基本解析器接口，因此自定义解析器可以与它们协同工作。以下是一些可能需要实现自定义解析器的场景：</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="fc19defcc7c6ad0e">
        <source>* Inspect incoming header fields and keep or discard them.</source>
        <target state="translated">* 检查传入的头部字段，并决定保留或丢弃。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">21</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2a56991d20adb251">
        <source>* Use a container provided by an external interface.</source>
        <target state="translated">* 使用外部接口提供的容器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">23</context>
        </context-group>
        <note from="developer">type: list</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5209242f2db1859a">
        <source>The basic parser uses virtual functions. To declare your user-defined parser, derive from __basic_parser__ and implement all the required virtual functions. A declaration for the derived class may look like this:</source>
        <target state="translated">基本解析器使用虚函数。要声明自定义解析器，需要从 __basic_parser__ 派生并实现所有必需的虚函数。派生类的声明大致如下：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">25</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
