Skip to content

asio::buffered_read_stream

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

詳細情報

メンバー

ASIO_STATIC_CONSTANT()

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

引数

  • default_buffer_size ``

buffered_read_stream()

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

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

引数

  • Arg & a

buffered_read_stream()

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

asio::buffered_read_stream< Stream >::buffered_read_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_read_stream< Stream >::next_layer()

戻り値

next_layer_type&

lowest_layer()

Get a reference to the lowest layer.

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

戻り値

lowest_layer_type&

lowest_layer()

Get a const reference to the lowest layer.

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

戻り値

const&

get_executor()

Get the executor associated with the object.

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

戻り値

executor_type

get_io_context()

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

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

戻り値

asio::io_context&

get_io_service()

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

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

戻り値

asio::io_context&

close()

Close the stream.

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

close()

Close the stream.

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

引数

  • asio::error_code& ec

戻り値

ASIO_SYNC_OP_VOID

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_read_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.

std::size_t asio::buffered_read_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_read_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_read_stream< Stream >::ASIO_MOVE_ARG(WriteHandler) handler)

引数

  • WriteHandler ``

fill()

Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation. Throws an exception on failure.

std::size_t asio::buffered_read_stream< Stream >::fill()

戻り値

std::size_t

fill()

Fill the buffer with some data. Returns the number of bytes placed in the buffer as a result of the operation, or 0 if an error occurred.

std::size_t asio::buffered_read_stream< Stream >::fill(asio::error_code &ec)

引数

  • asio::error_code& ec

戻り値

std::size_t

ASIO_INITFN_RESULT_TYPE()

Start an asynchronous fill.

asio::buffered_read_stream< Stream >::ASIO_INITFN_RESULT_TYPE(ReadHandler, void(asio::error_code, std::size_t)) async_fill(ASIO_MOVE_ARG(ReadHandler) handler)

引数

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

read_some()

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

std::size_t asio::buffered_read_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_read_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_read_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_read_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_read_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_read_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_read_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_read_stream< Stream >::in_avail(asio::error_code &ec)

引数

  • asio::error_code& ec

戻り値

std::size_t