10 #ifndef BOOST_BEAST_HTTP_BUFFER_BODY_HPP 11 #define BOOST_BEAST_HTTP_BUFFER_BODY_HPP 17 #include <boost/optional.hpp> 18 #include <type_traits> 98 #if BOOST_BEAST_DOXYGEN 99 using reader = implementation_defined;
103 bool toggle_ =
false;
108 boost::asio::const_buffers_1;
110 template<
bool isRequest,
class Fields>
121 ec.assign(0, ec.category());
125 std::pair<const_buffers_type, bool>>
137 ec.assign(0, ec.category());
143 ec.assign(0, ec.category());
151 ec.assign(0, ec.category());
161 #if BOOST_BEAST_DOXYGEN 162 using writer = implementation_defined;
169 template<
bool isRequest,
class Fields>
179 ec.assign(0, ec.category());
182 template<
class ConstBufferSequence>
187 using boost::asio::buffer_size;
188 using boost::asio::buffer_copy;
194 auto const bytes_transferred =
195 buffer_copy(boost::asio::buffer(
197 body_.
data =
reinterpret_cast<char*
>(
198 body_.
data) + bytes_transferred;
199 body_.
size -= bytes_transferred;
200 if(bytes_transferred == buffer_size(buffers))
201 ec.assign(0, ec.category());
204 return bytes_transferred;
210 ec.assign(0, ec.category());
216 #if ! BOOST_BEAST_DOXYGEN 218 template<
bool isRequest,
class Fields>
BufferSequence< boost::asio::const_buffer > ConstBufferSequence
Definition: type_traits.hpp:280
std::ostream & operator<<(std::ostream &os, message< isRequest, basic_file_body< File >, Fields > const &msg)=delete
std::size_t size
Definition: buffer_body.hpp:78
Definition: async_result.hpp:20
detail::ostream_helper< DynamicBuffer, char, std::char_traits< char >, detail::basic_streambuf_movable::value > ostream(DynamicBuffer &buffer)
Definition: ostream.hpp:91
Definition: type_traits.hpp:25
detail::buffers_helper< ConstBufferSequence > buffers(ConstBufferSequence const &b)
Definition: ostream.hpp:50
bool more
Definition: buffer_body.hpp:91
Definition: beast_common.hpp:6
The type of the body member when used in a message.
Definition: buffer_body.hpp:35
std::size_t put(ConstBufferSequence const &buffers, error_code &ec)
Definition: buffer_body.hpp:184
void init(boost::optional< std::uint64_t > const &, error_code &ec)
Definition: buffer_body.hpp:177
boost::system::error_code error_code
The type of error code used by the library.
Definition: error.hpp:21
Definition: buffer_body.hpp:164
void * data
Definition: buffer_body.hpp:59
writer(message< isRequest, buffer_body, Fields > &m)
Definition: buffer_body.hpp:171
void init(error_code &ec)
Definition: buffer_body.hpp:119
reader(message< isRequest, buffer_body, Fields > const &msg)
Definition: buffer_body.hpp:112
boost::asio::const_buffers_1 const_buffers_type
Definition: buffer_body.hpp:108
void finish(error_code &ec)
Definition: buffer_body.hpp:208
Definition: buffer_body.hpp:101
Definition: buffer_body.hpp:32