1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>http::chunk_header::chunk_header (4 of 5 overloads)</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="../chunk_header.html" title="http::chunk_header::chunk_header"> 9<link rel="prev" href="overload3.html" title="http::chunk_header::chunk_header (3 of 5 overloads)"> 10<link rel="next" href="overload5.html" title="http::chunk_header::chunk_header (5 of 5 overloads)"> 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="overload3.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../chunk_header.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="overload5.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 24</div> 25<div class="section"> 26<div class="titlepage"><div><div><h6 class="title"> 27<a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4"></a><a class="link" href="overload4.html" title="http::chunk_header::chunk_header (4 of 5 overloads)">http::chunk_header::chunk_header 28 (4 of 5 overloads)</a> 29</h6></div></div></div> 30<p> 31 Constructor. 32 </p> 33<h7><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.h0"></a> 34 <span class="phrase"><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.synopsis"></a></span><a class="link" href="overload4.html#beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.synopsis">Synopsis</a> 35 </h7><pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> 36 <span class="keyword">class</span> <span class="identifier">ChunkExtensions</span><span class="special">,</span> 37 <span class="keyword">class</span> <a href="https://en.cppreference.com/w/cpp/named_req/Allocator" target="_top"><span class="emphasis"><em>Allocator</em></span></a><span class="special">></span> 38<span class="identifier">chunk_header</span><span class="special">(</span> 39 <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">size</span><span class="special">,</span> 40 <span class="identifier">ChunkExtensions</span><span class="special">&&</span> <span class="identifier">extensions</span><span class="special">,</span> 41 <span class="identifier">Allocator</span> <span class="keyword">const</span><span class="special">&</span> <span class="identifier">allocator</span><span class="special">);</span> 42</pre> 43<h7><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.h1"></a> 44 <span class="phrase"><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.description"></a></span><a class="link" href="overload4.html#beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.description">Description</a> 45 </h7><p> 46 This constructs a buffer sequence representing a <span class="emphasis"><em>chunked-body</em></span> 47 size and terminating CRLF (<code class="computeroutput"><span class="string">"\r\n"</span></code>) 48 with provided chunk extensions. The specified allocator is used to provide 49 storage for the extensions object. 50 </p> 51<h7><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.h2"></a> 52 <span class="phrase"><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.parameters"></a></span><a class="link" href="overload4.html#beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.parameters">Parameters</a> 53 </h7><div class="informaltable"><table class="table"> 54<colgroup> 55<col> 56<col> 57</colgroup> 58<thead><tr> 59<th> 60 <p> 61 Name 62 </p> 63 </th> 64<th> 65 <p> 66 Description 67 </p> 68 </th> 69</tr></thead> 70<tbody> 71<tr> 72<td> 73 <p> 74 <code class="computeroutput"><span class="identifier">size</span></code> 75 </p> 76 </td> 77<td> 78 <p> 79 The size of the chunk body that follows. The value be greater 80 than zero. 81 </p> 82 </td> 83</tr> 84<tr> 85<td> 86 <p> 87 <code class="computeroutput"><span class="identifier">extensions</span></code> 88 </p> 89 </td> 90<td> 91 <p> 92 The chunk extensions object. The expression <code class="computeroutput"><span class="identifier">extensions</span><span class="special">.</span><span class="identifier">str</span><span class="special">()</span></code> must be valid, and the return 93 type must be convertible to <a class="link" href="../../boost__beast__string_view.html" title="string_view"><code class="computeroutput"><span class="identifier">string_view</span></code></a>. This 94 object will be copied or moved as needed to ensure that the 95 chunk header object retains ownership of the buffers provided 96 by the chunk extensions object. 97 </p> 98 </td> 99</tr> 100<tr> 101<td> 102 <p> 103 <code class="computeroutput"><span class="identifier">allocator</span></code> 104 </p> 105 </td> 106<td> 107 <p> 108 The allocator to provide storage for the moved or copied extensions 109 object. 110 </p> 111 </td> 112</tr> 113</tbody> 114</table></div> 115<h7><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.h3"></a> 116 <span class="phrase"><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.remarks"></a></span><a class="link" href="overload4.html#beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.remarks">Remarks</a> 117 </h7><p> 118 This function participates in overload resolution only if <span class="bold"><strong>ChunkExtensions</strong></span> 119 meets the requirements stated above. 120 </p> 121<h7><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.h4"></a> 122 <span class="phrase"><a name="beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.see_also"></a></span><a class="link" href="overload4.html#beast.ref.boost__beast__http__chunk_header.chunk_header.overload4.see_also">See 123 Also</a> 124 </h7><p> 125 <a href="https://tools.ietf.org/html/rfc7230#section-4.1" target="_top">https://tools.ietf.org/html/rfc7230#section-4.1</a> 126 </p> 127</div> 128<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 129<td align="left"></td> 130<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie 131 Falco<p> 132 Distributed under the Boost Software License, Version 1.0. (See accompanying 133 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>) 134 </p> 135</div></td> 136</tr></table> 137<hr> 138<div class="spirit-nav"> 139<a accesskey="p" href="overload3.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../chunk_header.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="overload5.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a> 140</div> 141</body> 142</html> 143