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 18:48+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-10-custom-parsers-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 "Custom Parsers"
msgstr "自定义解析器"

#. type: paragraph
#: 12
msgid ""
"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:"
msgstr ""
"虽然库自带的解析器能覆盖大部分常见场景，但通过继承 __basic_parser__ 接口，也"
"可以实现自定义的解析结果存储策略。基本解析器负责按 HTTP/1 协议规范将输入缓冲"
"区解析为各个元素，而派生类则决定如何处理这些元素。由于所有 HTTP 流读取算法都"
"只依赖基本解析器接口，因此自定义解析器可以与它们协同工作。以下是一些可能需要"
"实现自定义解析器的场景："

#. type: list
#: 21
msgid "* Inspect incoming header fields and keep or discard them."
msgstr "* 检查传入的头部字段，并决定保留或丢弃。"

#. type: list
#: 23
msgid "* Use a container provided by an external interface."
msgstr "* 使用外部接口提供的容器。"

#. type: paragraph
#: 25
msgid ""
"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:"
msgstr ""
"基本解析器使用虚函数。要声明自定义解析器，需要从 __basic_parser__ 派生并实现"
"所有必需的虚函数。派生类的声明大致如下："
