<?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="47f68801b5487a04">
        <source>Timeouts</source>
        <target state="translated">超时</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">12</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e5ceaefc19207a6a">
        <source>While [link beast.ref.boost__beast__basic_stream `basic_stream`] and [link beast.ref.boost__beast__basic_stream `tcp_stream`] support timeouts on general logical operations, the websocket stream has a more sophisticated timeout mechanism built-in which may be enabled and configured. The timeout features of the TCP or basic stream should not be used when working with a websocket stream. The interface to these timeout features is shown in this table.</source>
        <target state="translated">尽管 [link beast.ref.boost__beast__basic_stream `basic_stream`] 和 [link beast.ref.boost__beast__basic_stream `tcp_stream`] 支持对常规逻辑操作设置超时，但 WebSocket 流内置了更复杂的超时机制，可以启用并进行配置。在使用 WebSocket 流时，不应使用 TCP 或基础流的超时功能。这些超时功能的接口如下表所示。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">14</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c8e2eb4923384602">
        <source>WebSocket Timeout Interface</source>
        <target state="translated">WebSocket 超时接口</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="22">
        <source>Name</source>
        <target state="translated">名称</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="22">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a231de030c492d23">
        <source>[link beast.ref.boost__beast__websocket__stream_base__timeout `stream_base::timeout`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream_base__timeout `stream_base::timeout`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="04caff43265f8e8b">
        <source>This represents configured timeout settings for a websocket stream.</source>
        <target state="translated">该结构表示 WebSocket 流的超时配置设置。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d153a87f646e6222">
        <source>[link beast.ref.boost__beast__websocket__stream_base__timeout.suggested `stream_base::timeout::suggested`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream_base__timeout.suggested `stream_base::timeout::suggested`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b5ade9a5142a1497">
        <source>This function returns the suggested timeout settings for a given role (client or server).</source>
        <target state="translated">该函数返回给定角色（客户端或服务器）的建议超时设置。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bca4b9b9110d74b3">
        <source>[link beast.ref.boost__beast__websocket__stream.set_option `stream::set_option`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream.set_option `stream::set_option`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5d0da6e7c4d98e0c">
        <source>This function sets timeout and other options on the stream.</source>
        <target state="translated">该函数用于在流上设置超时及其他选项。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ce3aaada7ee26537">
        <source>There are three timeout settings which may be set independently on the stream:</source>
        <target state="translated">流上可以独立设置三种超时配置：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">42</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="27627e56a91d28cb">
        <source>WebSocket Timeout Interface (2)</source>
        <target state="translated">WebSocket 超时接口（2）</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="44">
        <source>Name</source>
        <target state="translated">名称</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4260caf7dbb163c2">
        <source>Type</source>
        <target state="translated">类型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="44">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f93ed2e187207075">
        <source>[link beast.ref.boost__beast__websocket__stream_base__timeout.handshake_timeout `timeout::handshake_timeout`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream_base__timeout.handshake_timeout `timeout::handshake_timeout`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" id="44">
        <source>`duration`</source>
        <target></target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="2feb237aae3f3e6e">
        <source>This is the amount of time after which a handshake will time out. The handshake timeout applies to client handshakes, server handshakes, as well as the websocket closing handshake performed when either end of the connection wish to shut down. The value returned by [link beast.ref.boost__beast__websocket__stream_base.none `stream_base::none()`] may be assigned to disable this timeout.</source>
        <target state="translated">该值表示握手超时的时间长度。该超时适用于客户端握手、服务器握手，以及连接任一端希望关闭时执行的 WebSocket 关闭握手。可将 [link beast.ref.boost__beast__websocket__stream_base.none `stream_base::none()`] 的返回值赋给该值以禁用此超时。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="14a192a1a1779eb7">
        <source>[link beast.ref.boost__beast__websocket__stream_base__timeout.idle_timeout `timeout::idle_timeout`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream_base__timeout.idle_timeout `timeout::idle_timeout`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="be09973b833e1b4c">
        <source>If no data or control frames are received from the peer for a time equal to the idle timeout, then the connection will time out. The value returned by [link beast.ref.boost__beast__websocket__stream_base.none `stream_base::none()`] may be assigned to disable this timeout.</source>
        <target state="translated">如果在对端没有收到数据或控制帧的时间达到空闲超时设定值，则连接将触发超时。可将 [link beast.ref.boost__beast__websocket__stream_base.none `stream_base::none()`] 的返回值赋给该值以禁用此超时。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f45217a21b106fec">
        <source>[link beast.ref.boost__beast__websocket__stream_base__timeout.keep_alive_pings `timeout::keep_alive_pings`]</source>
        <target state="translated">[link beast.ref.boost__beast__websocket__stream_base__timeout.keep_alive_pings `timeout::keep_alive_pings`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="293c2947c48c8f40">
        <source>`bool`</source>
        <target state="translated">`bool`（布尔值）</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0bbb16d5dee4d3c5">
        <source>If the idle timeout is enabled, then the value of this setting controls whether or not a ping frame will be sent to the peer if no data is received for half of the idle timeout interval.</source>
        <target state="translated">如果空闲超时启用，则该设置控制当在空闲超时时间的一半内未收到数据时，是否向对端发送 ping 帧。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">44</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="998bf20697aff5d5">
        <source>By default, timeouts on websocket streams are disabled. The easiest way to turn them on is to set the suggested timeout settings on the stream.</source>
        <target state="translated">默认情况下，WebSocket 流的超时功能处于禁用状态。启用该功能最简单的方式是在流上设置建议的超时配置。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">79</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="57e20ae3c12ce4e5">
        <source>For manual control over the settings, a timeout options object may be constructed. Here we enable only the handshake timeout.</source>
        <target state="translated">若需手动控制超时设置，可以构造一个超时选项对象。以下示例用于仅启用手动超时：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">84</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="21bf6c73b3591821">
        <source>Timeout notifications are delivered to the caller by invoking the completion handler for an outstanding asynchronous read operation with the error code [link beast.ref.boost__beast__error `error::timeout`]. The implementation will close the socket or stream before delivering this error. It is not necessary to manually shut down the connection, as it will already be shut down. A read operation must be outstanding for the error to be delivered.</source>
        <target state="translated">超时通知会通过调用未完成的异步读操作的完成处理器传达给调用方，同时附带错误码 [link beast.ref.boost__beast__error `error::timeout`]。在传递此错误之前，实现会关闭套接字或流，因此无需手动关闭连接。要收到该错误，必须存在一个未完成的读操作。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="891ea3b877376f9f">
        <source>Websocket timeout features are available only when using asynchronous I/O.</source>
        <target state="translated">WebSocket 超时功能仅在异步 I/O 模式下可用。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">98</context>
        </context-group>
        <note from="developer">type: note</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3655177f475551c8">
        <source>The timeouts on the websocket stream are incompatible with the timeouts used in the `tcp_stream`. When constructing a websocket stream from a tcp stream that has timeouts enabled, the timeout should be disabled first before constructing the websocket stream, as shown.</source>
        <target state="translated">WebSocket 流的超时机制与 tcp_stream 的超时机制不兼容。当从已启用超时的 tcp 流构造 WebSocket 流时，应首先禁用 tcp 流的超时，如下所示。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">102</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
