Skip to content

asio::buffered_write_stream

Adds buffering to the write-related operations of a stream.

詳細情報

メンバー

ASIO_STATIC_CONSTANT()

asio::buffered_write_stream< Stream >::ASIO_STATIC_CONSTANT(std::size_t, default_buffer_size=1024)

引数

  • default_buffer_size ``

buffered_write_stream()

Construct, passing the specified argument to initialise the next layer.

asio::buffered_write_stream< Stream >::buffered_write_stream(Arg &a)

引数

  • Arg & a

buffered_write_stream()

Construct, passing the specified argument to initialise the next layer.

asio::buffered_write_stream< Stream >::buffered_write_stream(Arg &a, std::size_t buffer_size)

引数

  • Arg & a
  • std::size_t buffer_size

next_layer()

Get a reference to the next layer.

next_layer_type& asio::buffered_write_stream< Stream >::next_layer()

戻り値

next_layer_type&

lowest_layer()

Get a reference to the lowest layer.

lowest_layer_type& asio::buffered_write_stream< Stream >::lowest_layer()

戻り値

lowest_layer_type&

lowest_layer()

Get a const reference to the lowest layer.

const lowest_layer_type& asio::buffered_write_stream< Stream >::lowest_layer() const

戻り値

const&

get_executor()

Get the executor associated with the object.

executor_type asio::buffered_write_stream< Stream >::get_executor() ASIO_NOEXCEPT

戻り値

executor_type

get_io_context()

(Deprecated: Use .) Get the associated with the object.

asio::io_context& asio::buffered_write_stream< Stream >::get_io_context()

戻り値

asio::io_context&

get_io_service()

(Deprecated: Use .) Get the associated with the object.

asio::io_context& asio::buffered_write_stream< Stream >::get_io_service()

戻り値

asio::io_context&

close()

Close the stream.

void asio::buffered_write_stream< Stream >::close()

close()

Close the stream.

ASIO_SYNC_OP_VOID asio::buffered_write_stream< Stream >::close(asio::error_code &ec)

引数

  • asio::error_code& ec

戻り値

ASIO_SYNC_OP_VOID

flush()

Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation. Throws an exception on failure.

std::size_t asio::buffered_write_stream< Stream >::flush()

戻り値

std::size_t

flush()

Flush all data from the buffer to the next layer. Returns the number of bytes written to the next layer on the last write operation, or 0 if an error occurred.

std::size_t asio::buffered_write_stream< Stream >::flush(asio::error_code &ec)

引数

  • asio::error_code& ec

戻り値

std::size_t

ASIO_INITFN_RESULT_TYPE()

Start an asynchronous flush.

asio::buffered_write_stream< Stream >::ASIO_INITFN_RESULT_TYPE(WriteHandler, void(asio::error_code, std::size_t)) async_flush(ASIO_MOVE_ARG(WriteHandler) handler)

引数

  • asio::error_codevoid(, std::size_t) ``

write_some()

Write the given data to the stream. Returns the number of bytes written. Throws an exception on failure.

std::size_t asio::buffered_write_stream< Stream >::write_some(const ConstBufferSequence &buffers)

引数

  • constConstBufferSequence & buffers

戻り値

std::size_t

write_some()

Write the given data to the stream. Returns the number of bytes written, or 0 if an error occurred and the error handler did not throw.

std::size_t asio::buffered_write_stream< Stream >::write_some(const ConstBufferSequence &buffers, asio::error_code &ec)

引数

  • constConstBufferSequence & buffers
  • asio::error_code& ec

戻り値

std::size_t

ASIO_INITFN_RESULT_TYPE()

Start an asynchronous write. The data being written must be valid for the lifetime of the asynchronous operation.

asio::buffered_write_stream< Stream >::ASIO_INITFN_RESULT_TYPE(WriteHandler, void(asio::error_code, std::size_t)) async_write_some(const ConstBufferSequence &buffers

引数

  • asio::error_codevoid(, std::size_t) ``

ASIO_MOVE_ARG()

asio::buffered_write_stream< Stream >::ASIO_MOVE_ARG(WriteHandler) handler)

引数

  • WriteHandler ``

read_some()

Read some data from the stream. Returns the number of bytes read. Throws an exception on failure.

std::size_t asio::buffered_write_stream< Stream >::read_some(const MutableBufferSequence &buffers)

引数

  • constMutableBufferSequence & buffers

戻り値

std::size_t

read_some()

Read some data from the stream. Returns the number of bytes read or 0 if an error occurred.

std::size_t asio::buffered_write_stream< Stream >::read_some(const MutableBufferSequence &buffers, asio::error_code &ec)

引数

  • constMutableBufferSequence & buffers
  • asio::error_code& ec

戻り値

std::size_t

ASIO_INITFN_RESULT_TYPE()

Start an asynchronous read. The buffer into which the data will be read must be valid for the lifetime of the asynchronous operation.

asio::buffered_write_stream< Stream >::ASIO_INITFN_RESULT_TYPE(ReadHandler, void(asio::error_code, std::size_t)) async_read_some(const MutableBufferSequence &buffers

引数

  • asio::error_codevoid(, std::size_t) ``

ASIO_MOVE_ARG()

asio::buffered_write_stream< Stream >::ASIO_MOVE_ARG(ReadHandler) handler)

引数

  • ReadHandler ``

peek()

Peek at the incoming data on the stream. Returns the number of bytes read. Throws an exception on failure.

std::size_t asio::buffered_write_stream< Stream >::peek(const MutableBufferSequence &buffers)

引数

  • constMutableBufferSequence & buffers

戻り値

std::size_t

peek()

Peek at the incoming data on the stream. Returns the number of bytes read, or 0 if an error occurred.

std::size_t asio::buffered_write_stream< Stream >::peek(const MutableBufferSequence &buffers, asio::error_code &ec)

引数

  • constMutableBufferSequence & buffers
  • asio::error_code& ec

戻り値

std::size_t

in_avail()

Determine the amount of data that may be read without blocking.

std::size_t asio::buffered_write_stream< Stream >::in_avail()

戻り値

std::size_t

in_avail()

Determine the amount of data that may be read without blocking.

std::size_t asio::buffered_write_stream< Stream >::in_avail(asio::error_code &ec)

引数

  • asio::error_code& ec

戻り値

std::size_t