Skip to main content

Module stream

Module stream 

Source
Expand description

Per-endpoint handle store and body channel types.

Rust owns all stream state; JS holds only opaque u64 handles. Each IrohEndpoint has its own HandleStore — no process-global registries. Handles are u64 values equal to key.data().as_ffi(), unique within the owning endpoint’s slot-map.

Structs§

BodyReader
Consumer end — stored in the reader registry. Uses tokio::sync::Mutex so we can .await the receiver without holding the registry’s std::sync::Mutex.
BodyWriter
Producer end — stored in the writer registry. mpsc::Sender is Clone, so we clone it out of the registry for each call.
HandleStore
Per-endpoint handle registry. Owns all body readers, writers, trailers, sessions, request-head rendezvous channels, and fetch-cancel tokens for a single IrohEndpoint.
ResponseHeadEntry
SessionEntry
StoreConfig
Configuration for a HandleStore. Set once at endpoint bind time.

Constants§

DEFAULT_CHANNEL_CAPACITY
DEFAULT_DRAIN_TIMEOUT_MS
DEFAULT_MAX_CHUNK_SIZE
DEFAULT_MAX_HANDLES
DEFAULT_SLAB_TTL_MS

Functions§

make_body_channel
Create a matched (writer, reader) pair backed by a bounded mpsc channel.