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