boost::corosio::io_read_stream

Abstract base for streams that support async reads.

Synopsis

class io_read_stream
    : public virtual io_object

Description

Provides the read_some operation via a pure virtual do_read_some dispatch point. Concrete classes override do_read_some to route through their implementation.

Uses virtual inheritance from io_object so that io_stream can combine this with io_write_stream without duplicating the io_object base.

Thread Safety

Distinct objects: Safe. Shared objects: Unsafe.

Base Classes

Name

Description

io_object

Base class for platform I/O objects.

Types

Name

Description

handle

RAII wrapper for I/O object implementation lifetime.

implementation

Base interface for platform I/O implementations.

io_service

Service interface for I/O object lifecycle management.

Member Functions

Name

Description

context

Return the execution context.

read_some

Asynchronously read data from the stream.

Protected Types

Name

Description

read_some_awaitable

Awaitable for async read operations.

Protected Member Functions

Name

Description

io_read_stream [constructor]

Construct from a handle.

operator= [deleted]

Move assign from another I/O object.

do_read_some [virtual]

Dispatch a read through the concrete implementation.

Protected Static Member Functions

Name

Description

create_handle

Create a handle bound to a service found in the context.

Protected Data Members

Name

Description

h_

The platform I/O handle owned by this object.

Derived Classes

Name

Description

io_stream

Platform stream with read/write operations.

See Also

io_write_stream, io_stream, io_object

Created with MrDocs