Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / beast / doc / html / beast / ref / boost__beast__http__response_serializer.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>http::response_serializer</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="../ref.html" title="This Page Intentionally Left Blank 2/2">
9 <link rel="prev" href="boost__beast__http__response_parser.html" title="http::response_parser">
10 <link rel="next" href="boost__beast__http__serializer.html" title="http::serializer">
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__response_parser.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__http__serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h4 class="title">
27 <a name="beast.ref.boost__beast__http__response_serializer"></a><a class="link" href="boost__beast__http__response_serializer.html" title="http::response_serializer">http::response_serializer</a>
28 </h4></div></div></div>
29 <p>
30         <a class="indexterm" name="idm45873490998576"></a>
31 A serializer for HTTP/1 responses.
32       </p>
33 <h5>
34 <a name="beast.ref.boost__beast__http__response_serializer.h0"></a>
35         <span class="phrase"><a name="beast.ref.boost__beast__http__response_serializer.synopsis"></a></span><a class="link" href="boost__beast__http__response_serializer.html#beast.ref.boost__beast__http__response_serializer.synopsis">Synopsis</a>
36       </h5>
37 <p>
38         Defined in header <code class="literal">&lt;<a href="../../../../../../boost/beast/http/serializer.hpp" target="_top">boost/beast/http/serializer.hpp</a>&gt;</code>
39       </p>
40 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
41     <span class="keyword">class</span> <a class="link" href="../concepts/Body.html" title="Body"><span class="emphasis"><em>Body</em></span></a><span class="special">,</span>
42     <span class="keyword">class</span> <a class="link" href="../concepts/Fields.html" title="Fields"><span class="emphasis"><em>Fields</em></span></a> <span class="special">=</span> <span class="identifier">fields</span><span class="special">&gt;</span>
43 <span class="keyword">using</span> <span class="identifier">response_serializer</span> <span class="special">=</span> <span class="identifier">serializer</span><span class="special">&lt;</span> <span class="keyword">false</span><span class="special">,</span> <span class="identifier">Body</span><span class="special">,</span> <span class="identifier">Fields</span> <span class="special">&gt;;</span>
44 </pre>
45 <h5>
46 <a name="beast.ref.boost__beast__http__response_serializer.h1"></a>
47         <span class="phrase"><a name="beast.ref.boost__beast__http__response_serializer.types"></a></span><a class="link" href="boost__beast__http__response_serializer.html#beast.ref.boost__beast__http__response_serializer.types">Types</a>
48       </h5>
49 <div class="informaltable"><table class="table">
50 <colgroup>
51 <col>
52 <col>
53 </colgroup>
54 <thead><tr>
55 <th>
56                 <p>
57                   Name
58                 </p>
59               </th>
60 <th>
61                 <p>
62                   Description
63                 </p>
64               </th>
65 </tr></thead>
66 <tbody><tr>
67 <td>
68                 <p>
69                   <a class="link" href="boost__beast__http__serializer/value_type.html" title="http::serializer::value_type"><span class="bold"><strong>value_type</strong></span></a>
70                 </p>
71               </td>
72 <td>
73                 <p>
74                   The type of message this serializer uses.
75                 </p>
76               </td>
77 </tr></tbody>
78 </table></div>
79 <h5>
80 <a name="beast.ref.boost__beast__http__response_serializer.h2"></a>
81         <span class="phrase"><a name="beast.ref.boost__beast__http__response_serializer.member_functions"></a></span><a class="link" href="boost__beast__http__response_serializer.html#beast.ref.boost__beast__http__response_serializer.member_functions">Member
82         Functions</a>
83       </h5>
84 <div class="informaltable"><table class="table">
85 <colgroup>
86 <col>
87 <col>
88 </colgroup>
89 <thead><tr>
90 <th>
91                 <p>
92                   Name
93                 </p>
94               </th>
95 <th>
96                 <p>
97                   Description
98                 </p>
99               </th>
100 </tr></thead>
101 <tbody>
102 <tr>
103 <td>
104                 <p>
105                   <a class="link" href="boost__beast__http__serializer/consume.html" title="http::serializer::consume"><span class="bold"><strong>consume</strong></span></a>
106                 </p>
107               </td>
108 <td>
109                 <p>
110                   Consume buffer octets in the serialization.
111                 </p>
112               </td>
113 </tr>
114 <tr>
115 <td>
116                 <p>
117                   <a class="link" href="boost__beast__http__serializer/get.html" title="http::serializer::get"><span class="bold"><strong>get</strong></span></a>
118                 </p>
119               </td>
120 <td>
121                 <p>
122                   Returns the message being serialized.
123                 </p>
124               </td>
125 </tr>
126 <tr>
127 <td>
128                 <p>
129                   <a class="link" href="boost__beast__http__serializer/is_done.html" title="http::serializer::is_done"><span class="bold"><strong>is_done</strong></span></a>
130                 </p>
131               </td>
132 <td>
133                 <p>
134                   Return true if serialization is complete.
135                 </p>
136               </td>
137 </tr>
138 <tr>
139 <td>
140                 <p>
141                   <a class="link" href="boost__beast__http__serializer/is_header_done.html" title="http::serializer::is_header_done"><span class="bold"><strong>is_header_done</strong></span></a>
142                 </p>
143               </td>
144 <td>
145                 <p>
146                   Return true if serialization of the header is complete.
147                 </p>
148               </td>
149 </tr>
150 <tr>
151 <td>
152                 <p>
153                   <a class="link" href="boost__beast__http__serializer/limit.html" title="http::serializer::limit"><span class="bold"><strong>limit</strong></span></a>
154                 </p>
155               </td>
156 <td>
157                 <p>
158                   Returns the serialized buffer size limit.
159                 </p>
160                 <p>
161                   Set the serialized buffer size limit.
162                 </p>
163               </td>
164 </tr>
165 <tr>
166 <td>
167                 <p>
168                   <a class="link" href="boost__beast__http__serializer/next.html" title="http::serializer::next"><span class="bold"><strong>next</strong></span></a>
169                 </p>
170               </td>
171 <td>
172                 <p>
173                   Returns the next set of buffers in the serialization.
174                 </p>
175               </td>
176 </tr>
177 <tr>
178 <td>
179                 <p>
180                   <a class="link" href="boost__beast__http__serializer/operator_eq_.html" title="http::serializer::operator="><span class="bold"><strong>operator=</strong></span></a>
181                 </p>
182               </td>
183 <td>
184                 <p>
185                   Assignment.
186                 </p>
187               </td>
188 </tr>
189 <tr>
190 <td>
191                 <p>
192                   <a class="link" href="boost__beast__http__serializer/serializer.html" title="http::serializer::serializer"><span class="bold"><strong>serializer</strong></span></a>
193                 </p>
194               </td>
195 <td>
196                 <p>
197                   Constructor.
198                 </p>
199               </td>
200 </tr>
201 <tr>
202 <td>
203                 <p>
204                   <a class="link" href="boost__beast__http__serializer/split.html" title="http::serializer::split"><span class="bold"><strong>split</strong></span></a>
205                 </p>
206               </td>
207 <td>
208                 <p>
209                   Returns true if we will pause after writing the complete header.
210                 </p>
211                 <p>
212                   Set whether the header and body are written separately.
213                 </p>
214               </td>
215 </tr>
216 <tr>
217 <td>
218                 <p>
219                   <a class="link" href="boost__beast__http__serializer/writer_impl.html" title="http::serializer::writer_impl"><span class="bold"><strong>writer_impl</strong></span></a>
220                 </p>
221               </td>
222 <td>
223                 <p>
224                   Provides low-level access to the associated BodyWriter
225                 </p>
226               </td>
227 </tr>
228 </tbody>
229 </table></div>
230 <p>
231         An object of this type is used to serialize a complete HTTP message into
232         a sequence of octets. To use this class, construct an instance with the message
233         to be serialized. The implementation will automatically perform chunk encoding
234         if the contents of the message indicate that chunk encoding is required.
235         Chunked output produced by the serializer never contains chunk extensions
236         or trailers, and the location of chunk boundaries is not specified. If callers
237         require chunk extensions, trailers, or control over the exact contents of
238         each chunk they should use the serializer to write just the message header,
239         and then assume control over serializing the chunked payload by using the
240         chunk buffer sequence types <a class="link" href="boost__beast__http__chunk_body.html" title="http::chunk_body"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">chunk_body</span></code></a>, <a class="link" href="boost__beast__http__chunk_crlf.html" title="http::chunk_crlf"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">chunk_crlf</span></code></a>, <a class="link" href="boost__beast__http__chunk_header.html" title="http::chunk_header"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">chunk_header</span></code></a>, and <a class="link" href="boost__beast__http__chunk_last.html" title="http::chunk_last"><code class="computeroutput"><span class="identifier">http</span><span class="special">::</span><span class="identifier">chunk_last</span></code></a>.
241       </p>
242 <h5>
243 <a name="beast.ref.boost__beast__http__response_serializer.h3"></a>
244         <span class="phrase"><a name="beast.ref.boost__beast__http__response_serializer.template_parameters"></a></span><a class="link" href="boost__beast__http__response_serializer.html#beast.ref.boost__beast__http__response_serializer.template_parameters">Template
245         Parameters</a>
246       </h5>
247 <div class="informaltable"><table class="table">
248 <colgroup>
249 <col>
250 <col>
251 </colgroup>
252 <thead><tr>
253 <th>
254                 <p>
255                   Type
256                 </p>
257               </th>
258 <th>
259                 <p>
260                   Description
261                 </p>
262               </th>
263 </tr></thead>
264 <tbody>
265 <tr>
266 <td>
267                 <p>
268                   <code class="computeroutput"><span class="identifier">isRequest</span></code>
269                 </p>
270               </td>
271 <td>
272                 <p>
273                   <code class="computeroutput"><span class="keyword">true</span></code> if the message
274                   is a request.
275                 </p>
276               </td>
277 </tr>
278 <tr>
279 <td>
280                 <p>
281                   <code class="computeroutput"><span class="identifier">Body</span></code>
282                 </p>
283               </td>
284 <td>
285                 <p>
286                   The body type of the message.
287                 </p>
288               </td>
289 </tr>
290 <tr>
291 <td>
292                 <p>
293                   <code class="computeroutput"><span class="identifier">Fields</span></code>
294                 </p>
295               </td>
296 <td>
297                 <p>
298                   The type of fields in the message.
299                 </p>
300               </td>
301 </tr>
302 </tbody>
303 </table></div>
304 <h5>
305 <a name="beast.ref.boost__beast__http__response_serializer.h4"></a>
306         <span class="phrase"><a name="beast.ref.boost__beast__http__response_serializer.description"></a></span><a class="link" href="boost__beast__http__response_serializer.html#beast.ref.boost__beast__http__response_serializer.description">Description</a>
307       </h5>
308 <p>
309         Convenience header <code class="literal">&lt;<a href="../../../../../../boost/beast/http.hpp" target="_top">boost/beast/http.hpp</a>&gt;</code>
310       </p>
311 </div>
312 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
313 <td align="left"></td>
314 <td align="right"><div class="copyright-footer">Copyright &#169; 2016-2019 Vinnie
315       Falco<p>
316         Distributed under the Boost Software License, Version 1.0. (See accompanying
317         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>)
318       </p>
319 </div></td>
320 </tr></table>
321 <hr>
322 <div class="spirit-nav">
323 <a accesskey="p" href="boost__beast__http__response_parser.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../ref.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="boost__beast__http__serializer.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
324 </div>
325 </body>
326 </html>