Glossary

This glossary defines terms used throughout the Corosio documentation.

A

Acceptor

An I/O object that listens for and accepts incoming connections. See tcp_acceptor and Acceptors Guide.

Affine Awaitable

An awaitable type that implements the affine protocol. It receives an io_env const* in await_suspend, carrying the executor, stop token, and frame allocator, to ensure correct executor affinity.

Affinity

The binding of a coroutine to a specific executor. A coroutine with affinity to executor ex has all its resumptions dispatched through ex.

buffer_param

A type-erased buffer sequence parameter, allowing non-template code to work with any buffer type.

any_executor

A type-erased wrapper for executors, enabling runtime polymorphism for executor types. See capy::any_executor.

Awaitable

A type that can be used with co_await. Must provide await_ready(), await_suspend(), and await_resume() methods.

B

Buffer

A contiguous region of memory. See capy::mutable_buffer (writable) and capy::const_buffer (read-only).

Buffer Sequence

A collection of buffers that can be iterated. Enables scatter/gather I/O with a single operation.

C

Cancellation

The ability to abort an in-progress asynchronous operation. Operations complete with an error code indicating cancellation.

Completion

The event when an asynchronous operation finishes, either successfully or with an error.

Completion Handler

A function or coroutine handle that runs when an operation completes.

Composed Operation

An operation built from multiple primitive operations. For example, capy::read() repeatedly calls read_some() until the buffer is full.

Concurrency Hint

A value passed to io_context indicating how many threads may call run(). Affects internal synchronization strategy.

Continuation

The code that runs after an asynchronous operation completes. In coroutines, this is the code following co_await.

Coroutine

A function that can suspend and resume execution. Uses co_await, co_yield, or co_return keywords.

Coroutine Handle

A low-level handle to a suspended coroutine, represented by std::coroutine_handle<>.

D

Delay

A stateless suspension for a duration or until a time point. See corosio::delay() and Delays and Timeouts.

E

Endpoint

A combination of IP address and port number identifying a network destination. See corosio::endpoint.

EOF (End of File/Stream)

A condition indicating no more data is available. Signaled by capy::cond::eof.

Error Category

A grouping of related error codes. The standard library uses categories to distinguish different error sources (system, generic, and capy).

Error Code

A lightweight error indicator. See std::error_code.

Error Condition

A portable error classification. Enables comparing errors across categories.

Execution Context

An environment where work runs. Provides service management and an executor. See capy::execution_context.

Executor

An object that can dispatch or post coroutine handles and work for execution. Satisfies the capy::Executor concept.

H

Handle

A reference to a system resource (socket, file, etc.) managed by the operating system.

I

I/O Context

The main event loop in Corosio. Processes asynchronous operations and dispatches completions. See io_context.

I/O Object

A class representing an I/O resource (socket, resolver, etc.). Base class is corosio::io_object.

I/O Stream

An I/O object that supports reading and writing data. Base class is corosio::io_stream.

io_result

The result type for Corosio operations, containing an error code and optional values. Supports structured bindings.

IOCP (I/O Completion Ports)

Windows kernel mechanism for scalable asynchronous I/O. Used by Corosio on Windows.

L

Lazy

A coroutine or operation that doesn’t start until explicitly triggered. capy::task is lazy—it starts when awaited.

Local Endpoint

A filesystem path used as the address for a Unix domain socket. Represented by corosio::local_endpoint. See Unix Domain Sockets.

M

Mocket

The in-process test double for a socket. See corosio::test::mocket.

Move-Only

A type that can be moved but not copied. Sockets and other I/O objects are move-only.

O

Operation

An asynchronous action that completes in the future. Returns an awaitable that can be `co_await`ed.

Outstanding Work

Work tracked by an I/O context. The context’s run() continues while outstanding work exists.

P

Platform Backend

The operating system-specific I/O implementation. Corosio provides five: epoll, kqueue, IOCP, io_uring, and select. The default selection is IOCP (Windows), epoll (Linux), kqueue (BSD/macOS), and select (fallback); io_uring is available but not selected by default.

Poll

Processing ready work without blocking. See io_context::poll().

Post

Queuing work for later execution. See executor_type::post().

Primitive Operation

A basic I/O operation like read_some() or write_some() that may transfer any amount of data.

R

Resolver

An I/O object that resolves host names to addresses. See resolver.

Resume

Continuing execution of a suspended coroutine.

Run

Processing the event loop. See io_context::run().

S

Scatter/Gather I/O

Reading into or writing from multiple non-contiguous buffers in a single operation.

Service

A polymorphic component owned by an execution context. Provides shared functionality.

Signal Set

An I/O object that waits for operating system signals. See corosio::signal_set.

Socket

An I/O object for network communication. See tcp_socket.

Stop Token

A mechanism for requesting cancellation. See std::stop_token.

Strand

A serialization mechanism that ensures handlers don’t run concurrently, so operations execute one at a time, eliminating data races without mutexes. Corosio does not provide a strand type; the equivalent is executor affinity or a single-threaded io_context. See Concurrent Programming.

Stream

A sequence of bytes that can be read or written incrementally.

Structured Bindings

C++17 feature for unpacking tuple-like types: auto [a, b] = expr;

Suspend

Pausing execution of a coroutine, yielding control to the caller.

Symmetric Transfer

A tail-call optimization where one coroutine directly resumes another without stack growth.

T

Task

A lazy coroutine that produces a value. See capy::task<T>.

TCP Server

A framework class for building TCP servers with worker pools. See corosio::tcp_server and TCP Server Guide.

Thread Safety

The ability to use an object safely from multiple threads. Individual I/O objects are not thread-safe.

Timeout

Racing an awaitable against a deadline. See corosio::timeout() and Delays and Timeouts.

TLS (Transport Layer Security)

Cryptographic protocol for secure communication. See corosio::wolfssl_stream.

Type Erasure

Hiding concrete types behind an abstract interface. Enables runtime polymorphism without templates.

U

Unix Domain Socket

A socket that communicates between processes on the same machine using filesystem paths instead of IP addresses and ports. Available as stream (local_stream_socket) and datagram (local_datagram_socket) variants. See Unix Domain Sockets.

W

Wait

An operation that suspends until a condition is met (a delay elapses, a socket becomes ready, a signal is received, etc.).

WolfSSL

A compact TLS library used by Corosio for secure streams.

Work

Pending operations that keep an I/O context running.

Worker Pool

A design pattern where a fixed number of worker objects are preallocated to handle connections. Provides bounded resource usage and avoids allocation during operation. See TCP Server.

See Also