<?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="ae46d3469cc00b75" weblate-flags="read-only">
        <source>Custom Body Types</source>
        <target state="translated">Custom Body Types</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="9a1435d9b0eb37fc" weblate-flags="read-only">
        <source>User-defined types are possible for the message body, where the type meets the __Body__ requirements. This simplified class declaration shows the customization points available to user-defined body types: ``` /// Defines a Body type struct body {</source>
        <target state="translated">User-defined types are possible for the message body, where the type meets the __Body__ requirements. This simplified class declaration shows the customization points available to user-defined body types: ``` /// Defines a Body type struct body {</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">13</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1a3d7b198ded861c" weblate-flags="read-only">
        <source>} ```</source>
        <target state="translated">} ```</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">33</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7e2d55cde8a6de8b" weblate-flags="read-only">
        <source>The meaning of the nested types is as follows</source>
        <target state="translated">The meaning of the nested types is as follows</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">36</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cc1ebc169e468231" weblate-flags="read-only">
        <source>Body Type Members</source>
        <target state="translated">Body Type Members</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b4c4db868dbf643a" weblate-flags="read-only">
        <source>Name</source>
        <target state="translated">Name</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f7f5c115cf553484" weblate-flags="read-only">
        <source>Description</source>
        <target state="translated">Description</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a65bcb465ca6f2e6" weblate-flags="read-only">
        <source>`value_type`</source>
        <target state="translated">`value_type`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="384a48135ea791a4" weblate-flags="read-only">
        <source>Determines the type of the [link beast.ref.boost__beast__http__message.body `message::body`] member.</source>
        <target state="translated">Determines the type of the [link beast.ref.boost__beast__http__message.body `message::body`] member.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="a077af8881d6e492" weblate-flags="read-only">
        <source>`reader`</source>
        <target state="translated">`reader`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="f96d6488fd32ac02" weblate-flags="read-only">
        <source>An optional nested type meeting the requirements of __BodyReader__, which provides the algorithm for storing a forward range of buffer sequences in the body representation. If present, this body type may be used with a __parser__.</source>
        <target state="translated">An optional nested type meeting the requirements of __BodyReader__, which provides the algorithm for storing a forward range of buffer sequences in the body representation. If present, this body type may be used with a __parser__.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="36e0a25eef2a6741" weblate-flags="read-only">
        <source>`writer`</source>
        <target state="translated">`writer`</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="4eeb97838dc1cdc5" weblate-flags="read-only">
        <source>An optional nested type meeting the requirements of __BodyWriter__, which provides the algorithm for converting the body representation to a forward range of buffer sequences. If present this body type may be used with a __serializer__.</source>
        <target state="translated">An optional nested type meeting the requirements of __BodyWriter__, which provides the algorithm for converting the body representation to a forward range of buffer sequences. If present this body type may be used with a __serializer__.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">38</context>
        </context-group>
        <note from="developer">type: table cell</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e520291155d7b259" weblate-flags="read-only">
        <source>Value Type</source>
        <target state="translated">Value Type</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">66</context>
        </context-group>
        <note from="developer">type: heading</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="17a5ca6656d66b30" weblate-flags="read-only">
        <source>The `value_type` nested type allows the body to define the declaration of the body type as it appears in the message. This can be any type. For example, a body's value type may specify `std::vector&lt;char&gt;` or `std::list&lt;std::string&gt;`. A custom body may even set the value type to something that is not a container for body octets, such as a [@boost:/libs/filesystem/doc/reference.html#class-path `boost::filesystem::path`]. Or, a more structured container may be chosen. This declares a body's value type as a JSON tree structure produced from a [@boost:/doc/html/json/input_output.html#json.input_output.parsing.streaming_parser `boost::json::stream_parser`]: ``` #include &lt;boost/json/stream_parser.hpp&gt;</source>
        <target state="translated">The `value_type` nested type allows the body to define the declaration of the body type as it appears in the message. This can be any type. For example, a body's value type may specify `std::vector&lt;char&gt;` or `std::list&lt;std::string&gt;`. A custom body may even set the value type to something that is not a container for body octets, such as a [@boost:/libs/filesystem/doc/reference.html#class-path `boost::filesystem::path`]. Or, a more structured container may be chosen. This declares a body's value type as a JSON tree structure produced from a [@boost:/doc/html/json/input_output.html#json.input_output.parsing.streaming_parser `boost::json::stream_parser`]: ``` #include &lt;boost/json/stream_parser.hpp&gt;</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">68</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="cf4fdc4882b68625" weblate-flags="read-only">
        <source>struct Body {</source>
        <target state="translated">struct Body {</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">80</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="5d23d166dd76cc10" weblate-flags="read-only">
        <source>}; ```</source>
        <target state="translated">}; ```</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">86</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="ee9c5a5e0a8c5b38" weblate-flags="read-only">
        <source>As long as a suitable reader or writer is available to provide the algorithm for transferring buffers in and out of the value type, those bodies may be parsed or serialized.</source>
        <target state="translated">As long as a suitable reader or writer is available to provide the algorithm for transferring buffers in and out of the value type, those bodies may be parsed or serialized.</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="4e3a0bb9e818f8db" weblate-flags="read-only">
        <source>File Body __example__</source>
        <target state="translated">File Body __example__</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">95</context>
        </context-group>
        <note from="developer">type: section title</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e992dcd904b248ce" weblate-flags="read-only">
        <source>Use of the flexible __Body__ concept customization point enables authors to preserve the self-contained nature of the __message__ object while allowing domain specific behaviors. Common operations for HTTP servers include sending responses which deliver file contents, and allowing for file uploads. In this example we build the [link beast.ref.boost__beast__http__basic_file_body `basic_file_body`] type which supports both reading and writing to a file on the file system. The interface is a class templated on the type of file used to access the file system, which must meet the requirements of __File__.</source>
        <target state="translated">Use of the flexible __Body__ concept customization point enables authors to preserve the self-contained nature of the __message__ object while allowing domain specific behaviors. Common operations for HTTP servers include sending responses which deliver file contents, and allowing for file uploads. In this example we build the [link beast.ref.boost__beast__http__basic_file_body `basic_file_body`] type which supports both reading and writing to a file on the file system. The interface is a class templated on the type of file used to access the file system, which must meet the requirements of __File__.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">97</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="caf14d591a66675b" weblate-flags="read-only">
        <source>First we declare the type with its nested types:</source>
        <target state="translated">First we declare the type with its nested types:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">108</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="1b080b010675a984" weblate-flags="read-only">
        <source>We will start with the definition of the `value_type`. Our strategy will be to store the file object directly in the message container through the `value_type` field. To use this body it will be necessary to call `msg.body.file().open()` first with the required information such as the path and open mode. This ensures that the file exists throughout the operation and prevent the race condition where the file is removed from the file system in between calls.</source>
        <target state="translated">We will start with the definition of the `value_type`. Our strategy will be to store the file object directly in the message container through the `value_type` field. To use this body it will be necessary to call `msg.body.file().open()` first with the required information such as the path and open mode. This ensures that the file exists throughout the operation and prevent the race condition where the file is removed from the file system in between calls.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">112</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="7adf2345ff6bc9a0" weblate-flags="read-only">
        <source>Our implementation of __BodyWriter__ will contain a small buffer from which the file contents are read. The buffer is provided to the implementation on each call until everything has been read in.</source>
        <target state="translated">Our implementation of __BodyWriter__ will contain a small buffer from which the file contents are read. The buffer is provided to the implementation on each call until everything has been read in.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">122</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="b1b361e610ef38cd" weblate-flags="read-only">
        <source>And here are the definitions for the functions we have declared:</source>
        <target state="translated">And here are the definitions for the functions we have declared:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">128</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="6f303673e6236848" weblate-flags="read-only">
        <source>Files can be read now, and the next step is to allow writing to files by implementing the __BodyReader__. The style is similar to the writer, except that buffers are incoming instead of outgoing. Here's the declaration:</source>
        <target state="translated">Files can be read now, and the next step is to allow writing to files by implementing the __BodyReader__. The style is similar to the writer, except that buffers are incoming instead of outgoing. Here's the declaration:</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">132</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
      <trans-unit xml:space="preserve" approved="no" id="e51edc6ead05debe" weblate-flags="read-only">
        <source>Finally, here is the implementation of the reader member functions:</source>
        <target state="translated">Finally, here is the implementation of the reader member functions:</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="460bd6af1ab8229f" weblate-flags="read-only">
        <source>We have created a full featured body type capable of reading and writing files on the filesystem, integrating seamlessly with the HTTP algorithms and message container. The body type works with any file implementation meeting the requirements of __File__ so it may be transparently used with solutions optimized for particular platforms. Example HTTP servers which use file bodies are available in the example directory.</source>
        <target state="translated">We have created a full featured body type capable of reading and writing files on the filesystem, integrating seamlessly with the HTTP algorithms and message container. The body type works with any file implementation meeting the requirements of __File__ so it may be transparently used with solutions optimized for particular platforms. Example HTTP servers which use file bodies are available in the example directory.</target>
        <context-group name="" purpose="location">
          <context context-type="sourcefile">143</context>
        </context-group>
        <note from="developer">type: paragraph</note>
      </trans-unit>
    </body>
  </file>
</xliff>
