Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / beast / doc / html / beast / ref / boost__beast__http__buffer_body__value_type / data.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>http::buffer_body::value_type::data</title>
5 <link rel="stylesheet" href="../../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../../index.html" title="Chapter&#160;1.&#160;Boost.Beast">
8 <link rel="up" href="../boost__beast__http__buffer_body__value_type.html" title="http::buffer_body::value_type">
9 <link rel="prev" href="../boost__beast__http__buffer_body__value_type.html" title="http::buffer_body::value_type">
10 <link rel="next" href="more.html" title="http::buffer_body::value_type::more">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="../boost__beast__http__buffer_body__value_type.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__http__buffer_body__value_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="more.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h5 class="title">
27 <a name="beast.ref.boost__beast__http__buffer_body__value_type.data"></a><a class="link" href="data.html" title="http::buffer_body::value_type::data">http::buffer_body::value_type::data</a>
28 </h5></div></div></div>
29 <p>
30           <a class="indexterm" name="idm45873501844208"></a>
31 A pointer to a contiguous area of memory
32           of <a class="link" href="size.html" title="http::buffer_body::value_type::size"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">buffer_body</span><span class="special">::</span><span class="identifier">value_type</span><span class="special">::</span><span class="identifier">size</span></code></a> octets, else <code class="computeroutput"><span class="keyword">nullptr</span></code>.
33         </p>
34 <h6>
35 <a name="beast.ref.boost__beast__http__buffer_body__value_type.data.h0"></a>
36           <span class="phrase"><a name="beast.ref.boost__beast__http__buffer_body__value_type.data.synopsis"></a></span><a class="link" href="data.html#beast.ref.boost__beast__http__buffer_body__value_type.data.synopsis">Synopsis</a>
37         </h6>
38 <pre class="programlisting"><span class="keyword">void</span> <span class="special">*</span> <span class="identifier">data</span> <span class="special">=</span> <span class="keyword">nullptr</span><span class="special">;</span>
39 </pre>
40 <h6>
41 <a name="beast.ref.boost__beast__http__buffer_body__value_type.data.h1"></a>
42           <span class="phrase"><a name="beast.ref.boost__beast__http__buffer_body__value_type.data.description"></a></span><a class="link" href="data.html#beast.ref.boost__beast__http__buffer_body__value_type.data.description">Description</a>
43         </h6>
44 <h6>
45 <a name="beast.ref.boost__beast__http__buffer_body__value_type.data.h2"></a>
46           <span class="phrase"><a name="beast.ref.boost__beast__http__buffer_body__value_type.data.when_serializing"></a></span><a class="link" href="data.html#beast.ref.boost__beast__http__buffer_body__value_type.data.when_serializing">When
47           Serializing</a>
48         </h6>
49 <p>
50           If this is <code class="computeroutput"><span class="keyword">nullptr</span></code> and <code class="computeroutput"><span class="identifier">more</span></code> is <code class="computeroutput"><span class="keyword">true</span></code>,
51           the error <a class="link" href="../boost__beast__http__error.html" title="http::error"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">need_buffer</span></code></a> will be returned from
52           <a class="link" href="../boost__beast__http__serializer/get.html" title="http::serializer::get"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">serializer</span><span class="special">::</span><span class="identifier">get</span></code></a> Otherwise, the serializer
53           will use the memory pointed to by <code class="computeroutput"><span class="identifier">data</span></code>
54           having <code class="computeroutput"><span class="identifier">size</span></code> octets of valid
55           storage as the next buffer representing the body.
56         </p>
57 <h6>
58 <a name="beast.ref.boost__beast__http__buffer_body__value_type.data.h3"></a>
59           <span class="phrase"><a name="beast.ref.boost__beast__http__buffer_body__value_type.data.when_parsing"></a></span><a class="link" href="data.html#beast.ref.boost__beast__http__buffer_body__value_type.data.when_parsing">When
60           Parsing</a>
61         </h6>
62 <p>
63           If this is <code class="computeroutput"><span class="keyword">nullptr</span></code>, the error
64           <a class="link" href="../boost__beast__http__error.html" title="http::error"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">need_buffer</span></code></a>
65           will be returned from <a class="link" href="../boost__beast__http__basic_parser/put.html" title="http::basic_parser::put"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">basic_parser</span><span class="special">::</span><span class="identifier">put</span></code></a>. Otherwise, the parser will
66           store body octets into the memory pointed to by <code class="computeroutput"><span class="identifier">data</span></code>
67           having <code class="computeroutput"><span class="identifier">size</span></code> octets of valid
68           storage. After octets are stored, the <code class="computeroutput"><span class="identifier">data</span></code>
69           and <code class="computeroutput"><span class="identifier">size</span></code> members are adjusted:
70           <code class="computeroutput"><span class="identifier">data</span></code> is incremented to
71           point to the next octet after the data written, while <code class="computeroutput"><span class="identifier">size</span></code>
72           is decremented to reflect the remaining space at the memory location pointed
73           to by <code class="computeroutput"><span class="identifier">data</span></code>.
74         </p>
75 </div>
76 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
77 <td align="left"></td>
78 <td align="right"><div class="copyright-footer">Copyright &#169; 2016-2019 Vinnie
79       Falco<p>
80         Distributed under the Boost Software License, Version 1.0. (See accompanying
81         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
82       </p>
83 </div></td>
84 </tr></table>
85 <hr>
86 <div class="spirit-nav">
87 <a accesskey="p" href="../boost__beast__http__buffer_body__value_type.html"><img src="../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../boost__beast__http__buffer_body__value_type.html"><img src="../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="more.html"><img src="../../../../../../../doc/src/images/next.png" alt="Next"></a>
88 </div>
89 </body>
90 </html>