Streams

Capy comes with an API for byte transport in the form of streams. Any concrete transport mechanism is expected to use this API to interoperate with Capy-based programs. Concrete mechanisms, such as IOCP or io_uring, are part of a separate library (Corosio). Capy defines the API.

The high-level idea is that data is read and written in chunks, and you keep awaiting individual chunk transport in a loop.

The streams API consists of