10 #ifndef BOOST_BEAST_BUFFERED_READ_STREAM_HPP 11 #define BOOST_BEAST_BUFFERED_READ_STREAM_HPP 18 #include <boost/asio/buffer.hpp> 19 #include <boost/asio/io_service.hpp> 91 template<
class Stream,
class DynamicBuffer>
95 "DynamicBuffer requirements not met");
97 template<
class Buffers,
class Handler>
100 DynamicBuffer buffer_;
101 std::size_t capacity_ = 0;
110 typename std::remove_reference<Stream>::type;
134 template<
class... Args>
156 return next_layer_.lowest_layer();
163 return next_layer_.lowest_layer();
167 boost::asio::io_service&
170 return next_layer_.get_io_service();
226 template<
class MutableBufferSequence>
242 template<
class MutableBufferSequence>
270 template<
class MutableBufferSequence,
class ReadHandler>
271 #if BOOST_BEAST_DOXYGEN 291 template<
class ConstBufferSequence>
296 "SyncWriteStream requirements not met");
297 return next_layer_.write_some(buffers);
312 template<
class ConstBufferSequence>
318 "SyncWriteStream requirements not met");
319 return next_layer_.write_some(buffers, ec);
345 template<
class ConstBufferSequence,
class WriteHandler>
346 #if BOOST_BEAST_DOXYGEN BufferSequence< boost::asio::const_buffer > ConstBufferSequence
Definition: type_traits.hpp:280
StreamHandler WriteHandler
Definition: type_traits.hpp:357
next_layer_type & next_layer()
Get a reference to the next layer.
Definition: buffered_read_stream.hpp:140
StreamHandler ReadHandler
Definition: type_traits.hpp:356
Definition: async_result.hpp:20
DynamicBuffer buffer_type
The type of the internal buffer.
Definition: buffered_read_stream.hpp:106
lowest_layer_type & lowest_layer()
Get a reference to the lowest layer.
Definition: buffered_read_stream.hpp:154
detail::buffers_helper< ConstBufferSequence > buffers(ConstBufferSequence const &b)
Definition: ostream.hpp:50
async_return_type< ReadHandler, void(error_code)> async_read_some(MutableBufferSequence const &buffers, ReadHandler &&handler)
DynamicBuffer & buffer()
Definition: buffered_read_stream.hpp:181
T type
Definition: type_traits.hpp:302
async_return_type< WriteHandler, void(error_code)> async_write_some(ConstBufferSequence const &buffers, WriteHandler &&handler)
buffered_read_stream(buffered_read_stream &&)=default
lowest_layer_type const & lowest_layer() const
Get a const reference to the lowest layer.
Definition: buffered_read_stream.hpp:161
boost::system::error_code error_code
The type of error code used by the library.
Definition: error.hpp:21
std::size_t read_some(MutableBufferSequence const &buffers)
Definition: buffered_read_stream.ipp:174
Definition: type_traits.hpp:479
buffered_read_stream & operator=(buffered_read_stream &&)=default
typename get_lowest_layer< next_layer_type >::type lowest_layer_type
The type of the lowest layer.
Definition: buffered_read_stream.hpp:114
void capacity(std::size_t size)
Definition: buffered_read_stream.hpp:209
Definition: type_traits.hpp:134
std::size_t write_some(ConstBufferSequence const &buffers, error_code &ec)
Definition: buffered_read_stream.hpp:314
DynamicBuffer const & buffer() const
Access the internal buffer.
Definition: buffered_read_stream.hpp:188
next_layer_type const & next_layer() const
Get a const reference to the next layer.
Definition: buffered_read_stream.hpp:147
Definition: buffered_read_stream.hpp:92
typename std::remove_reference< Stream >::type next_layer_type
The type of the next layer.
Definition: buffered_read_stream.hpp:110
typename beast::async_result< typename std::decay< CompletionToken >::type, Signature >::return_type async_return_type
Definition: async_result.hpp:204
std::size_t write_some(ConstBufferSequence const &buffers)
Definition: buffered_read_stream.hpp:293
boost::asio::io_service & get_io_service()
Get the io_service associated with the object.
Definition: buffered_read_stream.hpp:168
BufferSequence< boost::asio::mutable_buffer > MutableBufferSequence
Definition: type_traits.hpp:282