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:41+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-03-core-7a-echo-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
msgid "Echo __example__"
msgstr "Echo __example__"

#. type: paragraph
#: 12
#, fuzzy
msgid ""
"This example develops an initiating function called [*echo]. The operation "
"will read up to the first newline on a stream, and then write the same line "
"including the newline back on the stream. First we define the input "
"parameters and results, then declare our initiation function. For our echo "
"operation the only inputs are the stream and the completion token. The "
"output is the error code which is usually included in all completion handler "
"signatures."
msgstr ""
"This example develops an initiating function called [*echo]. The operation "
"will read up to the first newline on a stream, and then write the same line "
"including the newline back on the stream. First we define the input "
"parameters and results, then declare our initiation function. For our echo "
"operation the only inputs are the stream and the completion token. The "
"output is the error code which is usually included in all completion handler "
"signatures."

#. type: paragraph
#: 22
#, fuzzy
msgid ""
"Now that we have a declaration, we will define the body of the function. We "
"want to achieve the following goals: perform static type checking on the "
"input parameters, set up the return value as per __N3747__, and launch the "
"composed operation by constructing an intermediate, stateful completion "
"handler and invoking it."
msgstr ""
"Now that we have a declaration, we will define the body of the function. We "
"want to achieve the following goals: perform static type checking on the "
"input parameters, set up the return value as per __N3747__, and launch the "
"composed operation by constructing an intermediate, stateful completion "
"handler and invoking it."

#. type: paragraph
#: 28
#, fuzzy
msgid ""
"The initiating function contains a few relatively simple parts. There is the "
"customization of the return value type, static type checking, building the "
"return value type using the helper, and creating and launching the `echo_op` "
"composed operation object."
msgstr ""
"The initiating function contains a few relatively simple parts. There is the "
"customization of the return value type, static type checking, building the "
"return value type using the helper, and creating and launching the `echo_op` "
"composed operation object."

#. type: paragraph
#: 33
#, fuzzy
msgid ""
"The implementation strategy is to make the composed object meet the "
"requirements of a completion handler by being movable, and by making it "
"invocable so it can be used as a continuation for the asynchronous "
"operations it launches. Rather than using `std::bind` or `boost::bind`, "
"which destroys the type information and therefore breaks the associators, we "
"will simply pass `std::move(*this)` as the completion handler parameter for "
"any operations that we initiate. For the move to work correctly, care must "
"be taken to ensure that no access to data members are made after the move "
"takes place. Here is the complete implementation of our composed operation:"
msgstr ""
"The implementation strategy is to make the composed object meet the "
"requirements of a completion handler by being movable, and by making it "
"invocable so it can be used as a continuation for the asynchronous "
"operations it launches. Rather than using `std::bind` or `boost::bind`, "
"which destroys the type information and therefore breaks the associators, we "
"will simply pass `std::move(*this)` as the completion handler parameter for "
"any operations that we initiate. For the move to work correctly, care must "
"be taken to ensure that no access to data members are made after the move "
"takes place. Here is the complete implementation of our composed operation:"

#. type: paragraph
#: 45
#, fuzzy
msgid ""
"There are some common mistakes that should be avoided when writing composed "
"operations:"
msgstr ""
"There are some common mistakes that should be avoided when writing composed "
"operations:"

#. type: list
#: 48
#, fuzzy
msgid "* Type erasing the final handler. This will cause undefined behavior."
msgstr "* Type erasing the final handler. This will cause undefined behavior."

#. type: list
#: 50
#, fuzzy
msgid "* Forgetting to include a return statement after calling an"
msgstr "* Forgetting to include a return statement after calling an"

#. type: list
#: 53
#, fuzzy
msgid "* Calling a synchronous function by accident. In general composed"
msgstr "* Calling a synchronous function by accident. In general composed"

#. type: list
#: 57
#, fuzzy
msgid "* Forgetting to provide `executor_type` and `get_executor` for the"
msgstr "* Forgetting to provide `executor_type` and `get_executor` for the"

#. type: list
#: 65
#, fuzzy
msgid ""
"* Forgetting to create an object of type __executor_work_guard__ with the"
msgstr ""
"* Forgetting to create an object of type __executor_work_guard__ with the"

#. type: list
#: 68
#, fuzzy
msgid "* For operations which complete immediately (i.e. without calling an"
msgstr "* For operations which complete immediately (i.e. without calling an"

#. type: paragraph
#: 77
#, fuzzy
msgid ""
"The listing for a complete, runnable version of this example is in "
"[path_link example/echo-op/echo_op.cpp echo_op.cpp]."
msgstr ""
"The listing for a complete, runnable version of this example is in "
"[path_link example/echo-op/echo_op.cpp echo_op.cpp]."
