<?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="99551c08b3b897ab">
        <source>Layered Streams</source>
        <target state="translated">分层流类型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">10</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="28b98688e4326160">
        <source>Networking's __ssl_stream__ is a class template meeting the requirements of both synchronous and asynchronous read and write streams, implemented in terms of a "next layer" object whose type is determined by a class template parameter. The SSL stream constructs an instance of the next layer object internally, while allowing external access through the observer `net::ssl::stream::next_layer()`. This declares an SSL stream which uses a regular TCP/IP socket as the next layer:</source>
        <target state="translated">网络库中的 __ssl_stream__ 是一个类模板，它同时满足同步流与异步流的读写要求，其实现基于一个“下一层”对象，该对象的类型由类模板参数决定。SSL 流在内部构造下一层对象的实例，同时通过观察器 `net::ssl::stream::next_layer()` 提供外部访问。以下声明一个 SSL 流，该流使用普通的 TCP/IP 套接字作为其下一层：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">12</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5d4ea0e62f4c79e2">
        <source>Objects using this design pattern are referred to in networking as "a stack of stream layers". In Beast we use the term ['layered stream], although the property of having a next layer is not exclusive to streams. As with the SSL stream, __websocket_stream__ is a class template parameterized on a next layer object. This declares a websocket stream which uses a regular TCP/IP socket as the next layer:</source>
        <target state="translated">采用这种设计模式的对象在网络库中被称为“流层堆栈”。在 Beast 中，我们使用术语 [分层流]，但拥有下一层这一特性并非流所独有。与 SSL 流类似，__websocket_stream__ 也是一个以下一层对象为模板参数的类模板。以下声明一个 WebSocket 流，该流使用普通的 TCP/IP 套接字作为其下一层：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">22</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="22461b55f2f69da3">
        <source>If a Secure WebSockets stream is desired, this is accomplished simply by changing the type of the next layer and adjusting the constructor arguments to match:</source>
        <target state="translated">如果需要安全 WebSocket 流，只需改变下一层的类型并调整构造参数即可实现：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">31</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cdff0930df7052a1">
        <source>Higher level abstractions can be developed in this fashion by nesting stream layers to arbitrary degree. The stack of stream layers effectively forms a compile-time singly linked list. The object at the end of this list is called the ['lowest layer], and is special from the others because it typically represents the underlying socket.</source>
        <target state="translated">通过任意层级的嵌套，可以按这种方式构建更高层次的抽象。这些嵌套的流层在编译期形成一个单链表。链表末尾的对象称为 [最底层]，它与其他层有所不同，因为最底层通常代表底层的套接字。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">37</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="482ef5a99d052ad6">
        <source>Beast comes with several layered stream wrappers, as well as facilities for authoring and working with layered streams:</source>
        <target state="translated">Beast 提供多个分层流包装器，以及用于编写和操作分层流的工具：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">43</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7ba02dbaf1a3a760">
        <source>Layered Stream Algorithms and Types</source>
        <target state="translated">分层流算法与类型</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b4c4db868dbf643a">
        <source>Name</source>
        <target state="translated">名称</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f7f5c115cf553484">
        <source>Description</source>
        <target state="translated">描述</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f83b65de731edea5">
        <source>[link beast.ref.boost__beast__basic_stream `basic_stream`] [link beast.ref.boost__beast__tcp_stream `tcp_stream`]</source>
        <target state="translated">[link beast.ref.boost__beast__basic_stream `basic_stream`] [link beast.ref.boost__beast__tcp_stream `tcp_stream`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="26bab6e559674ea3">
        <source>This stream can be used for synchronous and asynchronous reading and writing. It allows timeouts to be set on logical operations, and can have an executor associated with the stream which is used to invoke completion handlers. This lets you set a strand on the stream once, which is then used for all asynchronous operations automatically.</source>
        <target state="translated">该流支持同步和异步读写操作。它允许为逻辑操作设置超时，也可以为流关联一个执行器，用来调用完成处理器。这样就可以对流只设置一次串行器，之后所有异步操作都会自动使用该串行器。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c0f79cf55c40cddd">
        <source>[link beast.ref.boost__beast__buffered_read_stream `buffered_read_stream`]</source>
        <target state="translated">[link beast.ref.boost__beast__buffered_read_stream `buffered_read_stream`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="c65c68316d09ffc2">
        <source>A buffered read stream meets the requirements for synchronous and asynchronous read and write streams, and additionally implements configurable buffering for reads.</source>
        <target state="translated">带缓冲的读流用于满足同步和异步读写流的要求，并额外实现可配置的读缓冲功能。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="70f479d0ebf2585b">
        <source>[link beast.ref.boost__beast__close_socket `close_socket`]</source>
        <target state="translated">[link beast.ref.boost__beast__close_socket `close_socket`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3b74faa7670adfb3">
        <source>This function closes a socket by performing an unqualified call to the [link beast.ref.boost__beast__beast_close_socket `beast_close_socket`] customization point, allowing sockets to be closed in generic contexts in an extensible fashion.</source>
        <target state="translated">该函数通过无限定调用 [link beast.ref.boost__beast__beast_close_socket `beast_close_socket`] 这个定制点来关闭套接字，从而在泛型上下文中以一种可扩展的方式完成套接字关闭。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="eca4bea7a9975a5c">
        <source>[link beast.ref.boost__beast__get_lowest_layer `get_lowest_layer`]</source>
        <target state="translated">[link beast.ref.boost__beast__get_lowest_layer `get_lowest_layer`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ce506f7f91279575">
        <source>Returns the lowest layer in a stack of stream layers by recursively calling the `next_layer` member function on each object until reaching an object which lacks the member. This example puts a layered stream into non-blocking mode by retrieving the TCP/IP socket in the lowest layer and changing the socket option:

[code_core_4_layers_4]</source>
        <target state="translated">通过递归调用每个对象的 `next_layer` 成员函数，直到遇到没有该成员的对象，从而返回流层堆栈中的最底层。以下示例通过获取最底层的 TCP/IP 套接字并修改其套接字选项，将分层流设置为非阻塞模式：

[code_core_4_layers_4]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a0a0e935315f04a0">
        <source>[link beast.ref.boost__beast__http__icy_stream `http::icy_stream`]</source>
        <target state="translated">[link beast.ref.boost__beast__http__icy_stream `http::icy_stream`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="271527eaf052da6d">
        <source>An ICY stream transparently converts the non-standard "ICY 200 OK" HTTP response from Shoutcast servers into a conforming 200 level HTTP response.</source>
        <target state="translated">ICY 流用于将 Shoutcast 服务器返回的非标准 “ICY 200 OK” HTTP 响应透明转换为符合规范的 200 级别 HTTP 响应。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ee3de2740596d3bf">
        <source>[link beast.ref.boost__beast__lowest_layer_type `lowest_layer_type`]</source>
        <target state="translated">[link beast.ref.boost__beast__lowest_layer_type `lowest_layer_type`]</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ee89b1edfbc91f61">
        <source>A metafunction to return the type of the lowest layer used in a type representing a stack of stream layers. This is the type of reference returned by [link beast.ref.boost__beast__get_lowest_layer `get_lowest_layer`]</source>
        <target state="translated">一个元函数，用于返回表示流层堆栈的类型中所使用的最底层的类型。该类型与 [link beast.ref.boost__beast__get_lowest_layer `get_lowest_layer`] 返回的引用类型一致。</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">46</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="314a399e59e2d8cf">
        <source>Counted Stream __example__</source>
        <target state="translated">计数流 __示例__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">105</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b57e472be631de9f">
        <source>This example shows the definition of a layered stream which keeps individual counts of the total number of bytes read from and written to the next layer. It meets the requirements for synchronous and asynchronous read and write streams:</source>
        <target state="translated">以下示例定义一个分层流，该流分别统计从下一层读取和写入的总字节数。该分层流满足同步与异步读写流的要求：</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">107</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
