<?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="en">
    <body>
      <trans-unit xml:space="preserve" approved="no" id="a9ff46dfc89a29e8" weblate-flags="read-only">
        <source>Handshaking</source>
        <target state="translated">Handshaking</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="1f6565aec3da6da2" weblate-flags="read-only">
        <source>Client Role</source>
        <target state="translated">Client Role</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">14</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="9b463b24fbfbdc84" weblate-flags="read-only">
        <source>A WebSocket session begins when a client sends the HTTP/1.1 [@https://tools.ietf.org/html/rfc7230#section-6.7 Upgrade] request for [@https://tools.ietf.org/html/rfc6455#section-1.3 WebSocket] on an established connection, and the server sends an appropriate response indicating that the request was accepted and that the connection has been upgraded. The Upgrade request must include the [@https://tools.ietf.org/html/rfc7230#section-5.4 Host] field, and the [@https://tools.ietf.org/html/rfc7230#section-5.3 target] of the resource to request. A typical HTTP Upgrade request created and sent by the implementation will look like this:</source>
        <target state="translated">A WebSocket session begins when a client sends the HTTP/1.1 [@https://tools.ietf.org/html/rfc7230#section-6.7 Upgrade] request for [@https://tools.ietf.org/html/rfc6455#section-1.3 WebSocket] on an established connection, and the server sends an appropriate response indicating that the request was accepted and that the connection has been upgraded. The Upgrade request must include the [@https://tools.ietf.org/html/rfc7230#section-5.4 Host] field, and the [@https://tools.ietf.org/html/rfc7230#section-5.3 target] of the resource to request. A typical HTTP Upgrade request created and sent by the implementation will look like this:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">16</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4c8d1ec09f124c12" weblate-flags="read-only">
        <source>WebSocket HTTP Upgrade Request</source>
        <target state="translated">WebSocket HTTP Upgrade Request</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">30</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="30" weblate-flags="read-only">
        <source>Wire Format</source>
        <target state="translated">Wire Format</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">30</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="30" weblate-flags="read-only">
        <source>Description</source>
        <target state="translated">Description</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">30</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="985ab27953f55fc5" weblate-flags="read-only">
        <source>GET / HTTP/1.1
Host: www.example.com
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Key: 2pGeTR0DsE4dfZs2pH+8MA==
Sec-WebSocket-Version: 13
User-Agent: Boost.Beast/216</source>
        <target state="translated">GET / HTTP/1.1
Host: www.example.com
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Key: 2pGeTR0DsE4dfZs2pH+8MA==
Sec-WebSocket-Version: 13
User-Agent: Boost.Beast/216</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">30</context>
        </context-group>
        <note from="developer">type: table code</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="286208246e07434c" weblate-flags="read-only">
        <source>The host and target parameters become part of the Host field and request-target in the resulting HTTP request. The key is generated by the implementation. Callers who wish to add, modify, or inspect fields may set the ['decorator] option on the stream (described later).</source>
        <target state="translated">The host and target parameters become part of the Host field and request-target in the resulting HTTP request. The key is generated by the implementation. Callers who wish to add, modify, or inspect fields may set the ['decorator] option on the stream (described later).</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">30</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="3a78e999acdc1a24" weblate-flags="read-only">
        <source>The [link beast.ref.boost__beast__websocket__stream `websocket::stream`] member functions [link beast.ref.boost__beast__websocket__stream.handshake `handshake`] and [link beast.ref.boost__beast__websocket__stream.async_handshake `async_handshake`] are used to send the request with the required host and target strings. This code connects to the IP address returned from a hostname lookup, then performs the WebSocket handshake in the client role.</source>
        <target state="translated">The [link beast.ref.boost__beast__websocket__stream `websocket::stream`] member functions [link beast.ref.boost__beast__websocket__stream.handshake `handshake`] and [link beast.ref.boost__beast__websocket__stream.async_handshake `async_handshake`] are used to send the request with the required host and target strings. This code connects to the IP address returned from a hostname lookup, then performs the WebSocket handshake in the client role.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">50</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="52acffe7b8df2c78" weblate-flags="read-only">
        <source>When a client receives an HTTP Upgrade response from the server indicating a successful upgrade, the caller may wish to perform additional validation on the received HTTP response message. For example, to check that the response to a basic authentication challenge is valid. To achieve this, overloads of the handshake member function allow the caller to store the received HTTP message in an output reference argument of type [link beast.ref.boost__beast__websocket__response_type `response_type`] as follows:</source>
        <target state="translated">When a client receives an HTTP Upgrade response from the server indicating a successful upgrade, the caller may wish to perform additional validation on the received HTTP response message. For example, to check that the response to a basic authentication challenge is valid. To achieve this, overloads of the handshake member function allow the caller to store the received HTTP message in an output reference argument of type [link beast.ref.boost__beast__websocket__response_type `response_type`] as follows:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">61</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="10a3cce6fe5e49a9" weblate-flags="read-only">
        <source>Server Role</source>
        <target state="translated">Server Role</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">74</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="0eb2e6a7837ad209" weblate-flags="read-only">
        <source>For servers accepting incoming connections, the [link beast.ref.boost__beast__websocket__stream `websocket::stream`] can read the incoming upgrade request and automatically reply. If the handshake meets the requirements, the stream sends back the upgrade response with a [@https://tools.ietf.org/html/rfc6455#section-4.2.2 ['101 Switching Protocols]] status code. If the handshake does not meet the requirements, or falls outside the range of allowed parameters specified by stream options set previously by the caller, the stream sends back an HTTP response with a status code indicating an error. Depending on the keep alive setting, the connection may remain open for a subsequent handshake attempt. A typical HTTP Upgrade response created and sent by the implementation upon receiving an upgrade request handshake will look like this:</source>
        <target state="translated">For servers accepting incoming connections, the [link beast.ref.boost__beast__websocket__stream `websocket::stream`] can read the incoming upgrade request and automatically reply. If the handshake meets the requirements, the stream sends back the upgrade response with a [@https://tools.ietf.org/html/rfc6455#section-4.2.2 ['101 Switching Protocols]] status code. If the handshake does not meet the requirements, or falls outside the range of allowed parameters specified by stream options set previously by the caller, the stream sends back an HTTP response with a status code indicating an error. Depending on the keep alive setting, the connection may remain open for a subsequent handshake attempt. A typical HTTP Upgrade response created and sent by the implementation upon receiving an upgrade request handshake will look like this:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">76</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a1d66dc6e888c809" weblate-flags="read-only">
        <source>WebSocket Upgrade HTTP Response</source>
        <target state="translated">WebSocket Upgrade HTTP Response</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="89" weblate-flags="read-only">
        <source>Wire Format</source>
        <target state="translated">Wire Format</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="89" weblate-flags="read-only">
        <source>Description</source>
        <target state="translated">Description</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f8348a596d2e21d1" weblate-flags="read-only">
        <source>HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Server: Boost.Beast</source>
        <target state="translated">HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Server: Boost.Beast</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: table code</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ae83c3c961e728d9" weblate-flags="read-only">
        <source>The [@https://tools.ietf.org/html/rfc6455#section-11.3.3 ['Sec-WebSocket-Accept]] field value is generated from the request in a fashion specified by the WebSocket protocol.</source>
        <target state="translated">The [@https://tools.ietf.org/html/rfc6455#section-11.3.3 ['Sec-WebSocket-Accept]] field value is generated from the request in a fashion specified by the WebSocket protocol.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">89</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f4b13a456cdf0649" weblate-flags="read-only">
        <source>The [link beast.ref.boost__beast__websocket__stream `stream`] member functions [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] are used to read the WebSocket HTTP Upgrade request handshake from a stream already connected to an incoming peer, and then send the WebSocket HTTP Upgrade response, as shown:</source>
        <target state="translated">The [link beast.ref.boost__beast__websocket__stream `stream`] member functions [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] are used to read the WebSocket HTTP Upgrade request handshake from a stream already connected to an incoming peer, and then send the WebSocket HTTP Upgrade response, as shown:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">106</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a877720299ffcfb1" weblate-flags="read-only">
        <source>Handshake Buffering</source>
        <target state="translated">Handshake Buffering</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">117</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="92d44d2bfbbecc2f" weblate-flags="read-only">
        <source>It is possible for servers to read data from the stream and decide later that the buffered bytes should be interpreted as a WebSocket upgrade request. To address this usage, overloads of [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] which accept an additional buffer sequence parameter are provided.</source>
        <target state="translated">It is possible for servers to read data from the stream and decide later that the buffered bytes should be interpreted as a WebSocket upgrade request. To address this usage, overloads of [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] which accept an additional buffer sequence parameter are provided.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">119</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="d8602eb1669fb925" weblate-flags="read-only">
        <source>In this example, the server reads the initial HTTP request header into a dynamic buffer, then later uses the buffered data to attempt a websocket upgrade.</source>
        <target state="translated">In this example, the server reads the initial HTTP request header into a dynamic buffer, then later uses the buffered data to attempt a websocket upgrade.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">126</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="73578298d6b4c29c" weblate-flags="read-only">
        <source>Inspecting HTTP Requests</source>
        <target state="translated">Inspecting HTTP Requests</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">132</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e5170d2104ee9ace" weblate-flags="read-only">
        <source>When implementing an HTTP server that also supports WebSocket, the server usually reads the HTTP request from the client. To detect when the incoming HTTP request is a WebSocket Upgrade request, the function [link beast.ref.boost__beast__websocket__is_upgrade `is_upgrade`] may be used.</source>
        <target state="translated">When implementing an HTTP server that also supports WebSocket, the server usually reads the HTTP request from the client. To detect when the incoming HTTP request is a WebSocket Upgrade request, the function [link beast.ref.boost__beast__websocket__is_upgrade `is_upgrade`] may be used.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">134</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4a2fdefb2ad9e581" weblate-flags="read-only">
        <source>Once the caller determines that the HTTP request is a WebSocket Upgrade, additional overloads of [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] are provided which receive the entire HTTP request header as an object to perform the handshake. By reading the request manually, the program can handle normal HTTP requests as well as upgrades. The program may also enforce policies based on the HTTP fields, such as Basic Authentication. In this example, the request is first read in using the HTTP algorithms, and then passed to a newly constructed stream:</source>
        <target state="translated">Once the caller determines that the HTTP request is a WebSocket Upgrade, additional overloads of [link beast.ref.boost__beast__websocket__stream.accept `accept`] and [link beast.ref.boost__beast__websocket__stream.async_accept `async_accept`] are provided which receive the entire HTTP request header as an object to perform the handshake. By reading the request manually, the program can handle normal HTTP requests as well as upgrades. The program may also enforce policies based on the HTTP fields, such as Basic Authentication. In this example, the request is first read in using the HTTP algorithms, and then passed to a newly constructed stream:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">139</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6eab80d87277f47a" weblate-flags="read-only">
        <source>Subprotocols</source>
        <target state="translated">Subprotocols</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">153</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="638a239e5b4a4cce" weblate-flags="read-only">
        <source>The WebSocket protocol understands the concept of subprotocols. If the client is requesting one of a set of subprotocols it will set the header [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] in the initial WebSocket Upgrade HTTP request. It is up to the server to parse the header and select one of the protocols to accept. The server indicates the selected protocol by setting the [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] header in the accept header.</source>
        <target state="translated">The WebSocket protocol understands the concept of subprotocols. If the client is requesting one of a set of subprotocols it will set the header [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] in the initial WebSocket Upgrade HTTP request. It is up to the server to parse the header and select one of the protocols to accept. The server indicates the selected protocol by setting the [@https://tools.ietf.org/html/rfc6455#section-11.3.4 Sec-WebSocket-Protocol] header in the accept header.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">155</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="bfc5ce4c1f4f4564" weblate-flags="read-only">
        <source>This is accomplished with a [link beast.ref.boost__beast__websocket__stream_base__decorator `decorator`].</source>
        <target state="translated">This is accomplished with a [link beast.ref.boost__beast__websocket__stream_base__decorator `decorator`].</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">164</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="8bc59b2a65db52c2" weblate-flags="read-only">
        <source>The code that follows demonstrates how a server reads an HTTP request, identifies it as a WebSocket Upgrade, and then checks for a preferred matching subprotocol before performing the WebSocket handshake:</source>
        <target state="translated">The code that follows demonstrates how a server reads an HTTP request, identifies it as a WebSocket Upgrade, and then checks for a preferred matching subprotocol before performing the WebSocket handshake:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">167</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
