msgid ""
msgstr ""
"Project-Id-Version: English (Boost Beast Translation (zh_Hans))\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2026-06-06 20:55+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-06-websocket-07-teardown-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
msgid "Teardown"
msgstr "Teardown"

#. type: paragraph
#: 12
#, read-only
msgid ""
"The WebSocket protocol requirements described in rfc6455 section 7.1.1 "
"outline an operation described as [@https://tools.ietf.org/html/"
"rfc6455#section-7.1.1 ['Close the WebSocket Connection]]. This operation "
"cleanly discards bytes remaining at receiving endpoints and also closes the "
"underlying TCP/IP connection. Orderly shutdowns are always preferred; for "
"TLS or SSL streams, a protocol-level shutdown is desired. This presents a "
"small issue for the [link beast.ref.boost__beast__websocket__stream "
"`stream`] implementation: the stream's `NextLayer` template type requires "
"only __SyncStream__ or __AsyncStream__, but those concepts do not support "
"the operations to shut down the connection."
msgstr ""
"The WebSocket protocol requirements described in rfc6455 section 7.1.1 "
"outline an operation described as [@https://tools.ietf.org/html/"
"rfc6455#section-7.1.1 ['Close the WebSocket Connection]]. This operation "
"cleanly discards bytes remaining at receiving endpoints and also closes the "
"underlying TCP/IP connection. Orderly shutdowns are always preferred; for "
"TLS or SSL streams, a protocol-level shutdown is desired. This presents a "
"small issue for the [link beast.ref.boost__beast__websocket__stream "
"`stream`] implementation: the stream's `NextLayer` template type requires "
"only __SyncStream__ or __AsyncStream__, but those concepts do not support "
"the operations to shut down the connection."

#. type: paragraph
#: 24
#, read-only
msgid ""
"To enable the implementation to perform the shutdown components of the close "
"operation, the library exposes two customization points expressed as free "
"functions associated with the next layer type:"
msgstr ""
"To enable the implementation to perform the shutdown components of the close "
"operation, the library exposes two customization points expressed as free "
"functions associated with the next layer type:"

#. type: list
#: 28
#, read-only
msgid ""
"* [link beast.ref.boost__beast__websocket__teardown `teardown`]: Overloads"
msgstr ""
"* [link beast.ref.boost__beast__websocket__teardown `teardown`]: Overloads"

#. type: list
#: 31
#, read-only
msgid ""
"* [link beast.ref.boost__beast__websocket__async_teardown `async_teardown`]:"
msgstr ""
"* [link beast.ref.boost__beast__websocket__async_teardown `async_teardown`]:"

#. type: paragraph
#: 34
#, read-only
msgid ""
"The implementation provides suitable overloads of the teardown customization "
"points when websocket streams are instantiated using the Asio types "
"__socket__ or __ssl_stream__ for the next layer. In this case no user action "
"is required. However, when the websocket stream is instantiated for a user-"
"defined type, compile errors will result if the customization points are not "
"provided for the user defined type. Furthermore, user-defined types that "
"wrap one of the Asio objects mentioned earlier may wish to invoke a teardown "
"customization point for the wrapped object. This is how those tasks are "
"accomplished."
msgstr ""
"The implementation provides suitable overloads of the teardown customization "
"points when websocket streams are instantiated using the Asio types "
"__socket__ or __ssl_stream__ for the next layer. In this case no user action "
"is required. However, when the websocket stream is instantiated for a user-"
"defined type, compile errors will result if the customization points are not "
"provided for the user defined type. Furthermore, user-defined types that "
"wrap one of the Asio objects mentioned earlier may wish to invoke a teardown "
"customization point for the wrapped object. This is how those tasks are "
"accomplished."

#. type: heading
#: 44
#, read-only
msgid "User-defined Teardown"
msgstr "User-defined Teardown"

#. type: paragraph
#: 46
#, read-only
msgid ""
"To provide overloads of teardown for a user-defined type, simply declare the "
"two free functions with the correct signature, accepting a reference to the "
"user-defined type as the stream parameter:"
msgstr ""
"To provide overloads of teardown for a user-defined type, simply declare the "
"two free functions with the correct signature, accepting a reference to the "
"user-defined type as the stream parameter:"

#. type: paragraph
#: 52
#, read-only
msgid ""
"When the implementation invokes the asynchronous teardown function, it "
"always uses an invokable completion handler. It is not necessary to specify "
"the return type customization when creating user-defined overloads of "
"`async_teardown`."
msgstr ""
"When the implementation invokes the asynchronous teardown function, it "
"always uses an invokable completion handler. It is not necessary to specify "
"the return type customization when creating user-defined overloads of "
"`async_teardown`."

#. type: heading
#: 57
#, read-only
msgid "Invoking Teardown"
msgstr "Invoking Teardown"

#. type: paragraph
#: 59
#, read-only
msgid ""
"To invoke the customization point, first bring the default implementation "
"into scope with a `using` statement. Then call the customization point "
"without namespace qualification, allowing argument-dependent lookup to take "
"effect:"
msgstr ""
"To invoke the customization point, first bring the default implementation "
"into scope with a `using` statement. Then call the customization point "
"without namespace qualification, allowing argument-dependent lookup to take "
"effect:"
