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-24 20:09+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-07-concepts-ratepolicy-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 "RatePolicy"
msgstr "速率策略"

#. type: paragraph
#: 12
msgid ""
"An instance of [*RatePolicy] is associated with a [link "
"beast.ref.boost__beast__basic_stream `basic_stream`], and controls the rate "
"at which bytes may be independently sent and received. This may be used to "
"achieve fine-grained bandwidth management and flow control."
msgstr ""
"`RatePolicy` 的实例与 [link beast.ref.boost__beast__basic_stream "
"`basic_stream`] 相关联，用于控制独立发送和接收字节的速率。这可用于实现细粒度"
"的带宽管理和流量控制。"

#. type: heading
#: 18
msgid "Associated Types"
msgstr "关联类型"

#. type: list
#: 20
msgid ""
"* [link beast.ref.boost__beast__rate_policy_access `rate_policy_access`]"
msgstr ""
"* [link beast.ref.boost__beast__rate_policy_access `rate_policy_access`]"

#. type: paragraph
#: 23
msgid "These requirements may undergo non-backward compatible"
msgstr "这些要求可能会发生不向后兼容的变更。"

#. type: heading
#: 27
msgid "Requirements"
msgstr "要求"

#. type: paragraph
#: 29
msgid "In this table:"
msgstr "在下表中："

#. type: list
#: 31
msgid ""
"* `P` denotes a type that meets the requirements of [*RatePolicy].\n"
"* `x` denotes an xvalue of type `P`\n"
"* `a` denotes a value of type `P`.\n"
"* `n` denotes a value of type `std::size_t`"
msgstr ""
"* `P` 表示一个满足 [*RatePolicy] 要求的类型。\n"
"* `x` 表示一个类型为 `P` 的将亡值（xvalue）。\n"
"* `a` 表示一个类型为 `P` 的值。\n"
"* `n` 表示一个类型为 `std::size_t` 的值。"

#. type: table title
#: 36
msgid "Valid expressions"
msgstr "有效表达式"

#. type: table cell
#: 36
msgid "Expression"
msgstr "表达式"

#. type: table cell
#: 36
msgid "Type"
msgstr "类型"

#. type: table cell
#: 36
msgid "Semantics, Pre/Post-conditions"
msgstr "语义，前置/后置条件"

#. type: table cell
#: 36
msgid "`P a(x)`"
msgstr "`P a(x)`"

#. type: table cell
#: 36
msgid "Requires ['MoveConstructible]."
msgstr "要求满足 ['MoveConstructible]。"

#. type: table cell
#: 36
msgid "`friend rate_policy_access`"
msgstr "`friend rate_policy_access`"

#. type: table cell
#: 36
msgid ""
"The member functions required in `P` should be private. [link "
"beast.ref.boost__beast__rate_policy_access `rate_policy_access`] must be a "
"friend of `P` for the implementation to gain access to the required member "
"functions."
msgstr ""
"`P` 中要求的成员函数应当是私有的。[link "
"beast.ref.boost__beast__rate_policy_access `rate_policy_access`] 必须是 `P` "
"的友元，以便实现能够访问这些必需的成员函数。"

#. type: table cell
#: 36
msgid "`a.available_read_bytes()`"
msgstr "`a.available_read_bytes()`"

#. type: table cell
#.
#: 36
msgctxt "36"
msgid "`std::size_t`"
msgstr ""

#. type: table cell
#: 36
msgid ""
"This function is called by the implementation to determine the maximum "
"number of allowed bytes to be transferred in the next read operation. The "
"actual number of bytes subsequently transferred may be less than this "
"number.\n"
"\n"
"If the policy returns a value of zero, the read operation will "
"asynchronously wait until the next timer interval before retrying. When the "
"retry occurs, this function will be called again."
msgstr ""
"实现会调用此函数，以确定下一次读取操作允许传输的最大字节数。随后实际传输的字"
"节数可能会小于该数值。\n"
"\n"
"如果该策略返回零值，读取操作将异步等待直到下一个计时器间隔再进行重试。当重试"
"发生时，此函数将再次被调用。"

#. type: table cell
#: 36
msgid "`a.available_write_bytes()`"
msgstr "`a.available_write_bytes()`"

#. type: table cell
#: 36
msgid ""
"This function is called by the implementation to determine the maximum "
"number of allowed bytes to be transferred in the next write operation. The "
"actual number of bytes subsequently transferred may be less than this "
"number.\n"
"\n"
"If the policy returns a value of zero, the read operation will "
"asynchronously wait until the next timer interval before retrying. When the "
"retry occurs, this function will be called again."
msgstr ""
"实现会调用此函数，以确定下一次写入操作允许传输的最大字节数。随后实际传输的字"
"节数可能会小于该数值。\n"
"如果该策略返回零值，写入操作将异步等待直到下一个计时器间隔再进行重试。当重试"
"发生时，此函数将再次被调用。"

#. type: table cell
#: 36
msgid "`a.transfer_read_bytes(n)`"
msgstr "`a.transfer_read_bytes(n)`"

#. type: table cell
#: 36
msgid ""
"The implementation calls this function to inform the policy that `n` bytes "
"were successfully transferred in the most recent read operation. The policy "
"object may optionally use this information to calculate throughputs and/or "
"inform the algorithm used to determine subsequently queried transfer "
"maximums."
msgstr ""
"实现会调用此函数，以通知策略在最近一次读取操作中已成功传输了 `n` 个字节。策略"
"对象可以选择性地利用此信息来计算吞吐量，和/或用于优化后续查询传输最大值时所使"
"用的算法。"

#. type: table cell
#: 36
msgid "`a.transfer_write_bytes(n)`"
msgstr "`a.transfer_write_bytes(n)`"

#. type: table cell
#: 36
msgid ""
"The implementation calls this function to inform the policy that `n` bytes "
"were successfully transferred in the most recent write operation. The policy "
"object may optionally use this information to calculate throughputs and/or "
"inform the algorithm used to determine subsequently queried transfer limits."
msgstr ""
"实现会调用此函数，以通知策略在最近一次写入操作中已成功传输了 `n` 个字节。策略"
"对象可以选择性地利用此信息来计算吞吐量，和/或用于优化后续查询传输上限时所使用"
"的算法。"

#. type: table cell
#: 36
msgid "`a.on_timer()`"
msgstr "`a.on_timer()`"

#. type: table cell
#: 36
msgid ""
"The implementation calls this function every time the internal timer "
"expires. The policy object may optionally use this opportunity to calculate "
"elapsed time and throughput, and/or inform the algorithm used to determine "
"subsequently queried transfer limits."
msgstr ""
"每当内部计时器到期时，实现都会调用此函数。策略对象可以选择性地利用此机会来计"
"算已用时间和吞吐量，和/或用于优化后续查询传输上限时所使用的算法。"

#. type: heading
#: 115
msgid "Exemplar"
msgstr "示例"

#. type: heading
#: 119
msgid "Models"
msgstr "模型"

#. type: list
#: 121
msgid ""
"* [link beast.ref.boost__beast__simple_rate_policy `simple_rate_policy`]\n"
"* [link beast.ref.boost__beast__unlimited_rate_policy "
"`unlimited_rate_policy`]"
msgstr ""
"* [link beast.ref.boost__beast__simple_rate_policy `simple_rate_policy`]\n"
"* [link beast.ref.boost__beast__unlimited_rate_policy "
"`unlimited_rate_policy`]"
