boost::corosio::io_object
Base class for platform I/O objects.
Synopsis
Declared in <boost/corosio/io_object.hpp>
class io_object;
Description
Provides common infrastructure for I/O objects that wrap kernel resources (sockets, timers, signal handlers, acceptors). Derived classes dispatch operations through a platform‐specific vtable (IOCP, epoll, kqueue, io_uring).
Semantics
Only concrete platform I/O types should inherit from io_object. Test mocks, decorators, and stream adapters must not inherit from this class. Use concepts or templates for generic I/O algorithms.
Thread Safety
Distinct objects: Safe. Shared objects: Unsafe. All operations on a single I/O object must be serialized.
|
Intended as a protected base class. The implementation pointer |
Types
Name |
Description |
RAII wrapper for I/O object implementation lifetime. |
|
Forward declaration for platform‐specific implementation. |
|
Base interface for platform I/O implementations. |
|
Service interface for I/O object lifecycle management. |
Protected Member Functions
Name |
Description |
|
Construct an I/O object bound to the given context. |
|
Destructor |
Derived Classes
| Name | Description |
|---|---|
Platform stream with read/write operations. |
|
An asynchronous DNS resolver for coroutine I/O. |
|
An asynchronous signal set for coroutine I/O. |
|
An asynchronous TCP acceptor for coroutine I/O. |
|
An asynchronous timer for coroutine I/O. |
See Also
io_stream, tcp_socket, tcp_acceptor
Created with MrDocs