11 #ifndef ASIO_BUFFERED_WRITE_STREAM_HPP 12 #define ASIO_BUFFERED_WRITE_STREAM_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 47 template <
typename Stream>
58 #if defined(GENERATING_DOCUMENTATION) 59 static const std::size_t default_buffer_size = implementation_defined;
66 template <
typename Arg>
69 storage_(default_buffer_size)
74 template <
typename Arg>
90 return next_layer_.lowest_layer();
96 return next_layer_.lowest_layer();
102 return next_layer_.get_io_service();
114 return next_layer_.close(ec);
128 template <
typename WriteHandler>
135 template <
typename ConstBufferSequence>
140 template <
typename ConstBufferSequence>
141 std::size_t
write_some(
const ConstBufferSequence& buffers,
146 template <
typename ConstBufferSequence,
typename WriteHandler>
149 async_write_some(
const ConstBufferSequence& buffers,
154 template <
typename MutableBufferSequence>
155 std::size_t
read_some(
const MutableBufferSequence& buffers)
157 return next_layer_.read_some(buffers);
162 template <
typename MutableBufferSequence>
163 std::size_t
read_some(
const MutableBufferSequence& buffers,
166 return next_layer_.read_some(buffers, ec);
171 template <
typename MutableBufferSequence,
typename ReadHandler>
174 async_read_some(
const MutableBufferSequence& buffers,
181 next_layer_.async_read_some(buffers,
190 template <
typename MutableBufferSequence>
191 std::size_t
peek(
const MutableBufferSequence& buffers)
193 return next_layer_.peek(buffers);
198 template <
typename MutableBufferSequence>
199 std::size_t
peek(
const MutableBufferSequence& buffers,
202 return next_layer_.peek(buffers, ec);
208 return next_layer_.in_avail();
214 return next_layer_.in_avail(ec);
220 template <
typename ConstBufferSequence>
221 std::size_t copy(
const ConstBufferSequence& buffers);
236 #endif // ASIO_BUFFERED_WRITE_STREAM_HPP buffered_write_stream(Arg &a, std::size_t buffer_size)
Construct, passing the specified argument to initialise the next layer.
std::size_t in_avail(asio::error_code &ec)
Determine the amount of data that may be read without blocking.
Provides core I/O functionality.
asio::error_code close(asio::error_code &ec)
Close the stream.
ASIO_INITFN_RESULT_TYPE(WriteHandler, void(asio::error_code, std::size_t)) async_flush(ASIO_MOVE_ARG(WriteHandler) handler)
Start an asynchronous flush.
lowest_layer_type & lowest_layer()
Get a reference to the lowest layer.
std::size_t peek(const MutableBufferSequence &buffers)
asio::basic_streambuf< Allocator > MatchCondition enable_if< is_match_condition< MatchCondition >::value >::type *detail::async_result_init< ReadHandler, void(asio::error_code, std::size_t)> init(ASIO_MOVE_CAST(ReadHandler)(handler))
#define ASIO_HANDLER_TYPE(h, sig)
std::size_t read_some(const MutableBufferSequence &buffers)
const lowest_layer_type & lowest_layer() const
Get a const reference to the lowest layer.
next_layer_type::lowest_layer_type lowest_layer_type
The type of the lowest layer.
std::size_t peek(const MutableBufferSequence &buffers, asio::error_code &ec)
std::size_t buffer_size(const mutable_buffer &b)
Get the number of bytes in a modifiable buffer.
const MutableBufferSequence & buffers
std::size_t in_avail()
Determine the amount of data that may be read without blocking.
ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size=1024)
next_layer_type & next_layer()
Get a reference to the next layer.
Class to represent an error code value.
buffered_write_stream(Arg &a)
Construct, passing the specified argument to initialise the next layer.
handler_type< Handler, Signature >::type handler
ASIO_MOVE_ARG(WriteHandler) handler)
#define ASIO_MOVE_CAST(type)
std::size_t read_some(const MutableBufferSequence &buffers, asio::error_code &ec)
async_result< typename handler_type< Handler, Signature >::type > result
void close()
Close the stream.
remove_reference< Stream >::type next_layer_type
The type of the next layer.
std::size_t write_some(const ConstBufferSequence &buffers)
asio::io_service & get_io_service()
Get the io_service associated with the object.
Adds buffering to the write-related operations of a stream.
ASIO_MOVE_ARG(ReadHandler) handler)