Skip to main content

Module mux

Module mux 

Source
Expand description

One connection, several nomiscript streams (ADR-0036).

A stream is an unchanged Session with its own worker and a bounded queue. One eval runs at a time across the connection’s streams.

Replies go through a bounded channel that Mux::new hands back. A worker waits while it is full. Mux::frame never waits: it returns a refusal as data, so the caller decides where it goes. A reader that must not outrun the streams calls Mux::ready first.

Structs§

AbortHandle
Aborts every stream of its Mux, whether or not the Mux is still alive: what runs is dropped at its next yield and what is queued is answered interrupted. For a client that is gone.
Mux

Constants§

MAX_STREAMS
Streams per connection, stream 0 included.
QUEUE_CAPACITY
Requests a stream queues before it answers busy.

Functions§

reject_input
The parse reply for input that could not be framed.

Type Aliases§

OpenSession
Session::new or Session::guarded.