ゴミ箱
|
#include <chunk_encode.hpp>
Public Types | |
using | value_type = typename view_type::value_type |
Required for ConstBufferSequence. More... | |
using | const_iterator = typename view_type::const_iterator |
Required for ConstBufferSequence. More... | |
Public Member Functions | |
chunk_body (ConstBufferSequence const &buffers) | |
chunk_body (ConstBufferSequence const &buffers, string_view extensions) | |
template<class ChunkExtensions , class = typename std::enable_if< ! std::is_convertible<typename std::decay< ChunkExtensions>::type, string_view>::value>::type> | |
chunk_body (ConstBufferSequence const &buffers, ChunkExtensions &&extensions) | |
template<class ChunkExtensions , class Allocator , class = typename std::enable_if< ! std::is_convertible<typename std::decay< ChunkExtensions>::type, string_view>::value>::type> | |
chunk_body (ConstBufferSequence const &buffers, ChunkExtensions &&extensions, Allocator const &allocator) | |
const_iterator | begin () const |
Required for ConstBufferSequence. More... | |
const_iterator | end () const |
Required for ConstBufferSequence. More... | |
A chunk
This implements a ConstBufferSequence representing a chunk. The serialized format is as follows:
The chunk extension is optional.
To use this class, pass an instance of it to a stream algorithm as the buffer sequence.
using boost::beast::http::chunk_body< ConstBufferSequence >::const_iterator = typename view_type::const_iterator |
Required for ConstBufferSequence.
using boost::beast::http::chunk_body< ConstBufferSequence >::value_type = typename view_type::value_type |
Required for ConstBufferSequence.
|
explicit |
Constructor
This constructs buffers representing a complete chunk with no chunk extensions and having the size and contents of the specified buffer sequence.
buffers | A buffer sequence representing the chunk body. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid while this object is in use. |
boost::beast::http::chunk_body< ConstBufferSequence >::chunk_body | ( | ConstBufferSequence const & | buffers, |
string_view | extensions | ||
) |
Constructor
This constructs buffers representing a complete chunk with the passed chunk extensions and having the size and contents of the specified buffer sequence.
buffers | A buffer sequence representing the chunk body. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid while this object is in use. |
extensions | The chunk extensions string. This string must be formatted correctly as per rfc7230, using this BNF syntax: chunk-ext = *( ";" chunk-ext-name [ "=" chunk-ext-val ] ) chunk-ext-name = token chunk-ext-val = token / quoted-string |
boost::beast::http::chunk_body< ConstBufferSequence >::chunk_body | ( | ConstBufferSequence const & | buffers, |
ChunkExtensions && | extensions | ||
) |
Constructor
This constructs buffers representing a complete chunk with the passed chunk extensions and having the size and contents of the specified buffer sequence. The default allocator is used to provide storage for the extensions object.
buffers | A buffer sequence representing the chunk body. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid while this object is in use. |
extensions | The chunk extensions object. The expression extensions.str() must be valid, and the return type must be convertible to string_view. This object will be copied or moved as needed to ensure that the chunk header object retains ownership of the buffers provided by the chunk extensions object. |
boost::beast::http::chunk_body< ConstBufferSequence >::chunk_body | ( | ConstBufferSequence const & | buffers, |
ChunkExtensions && | extensions, | ||
Allocator const & | allocator | ||
) |
Constructor
This constructs buffers representing a complete chunk with the passed chunk extensions and having the size and contents of the specified buffer sequence. The specified allocator is used to provide storage for the extensions object.
buffers | A buffer sequence representing the chunk body. Although the buffers object may be copied as necessary, ownership of the underlying memory blocks is retained by the caller, which must guarantee that they remain valid while this object is in use. |
extensions | The chunk extensions object. The expression extensions.str() must be valid, and the return type must be convertible to string_view. This object will be copied or moved as needed to ensure that the chunk header object retains ownership of the buffers provided by the chunk extensions object. |
allocator | The allocator to provide storage for the moved or copied extensions object. |
|
inline |
Required for ConstBufferSequence.
|
inline |
Required for ConstBufferSequence.