Skip to main content

Module event

Module event 

Source
Expand description

Cross-task event bus for rtcom-core.

Every meaningful thing that happens in a Session — a chunk of bytes from the wire, a chunk pending transmission, a config change, a fatal error — flows through the EventBus as an Event. The bus is a thin wrapper over tokio::sync::broadcast so any number of subscribers (terminal renderer, log writer, scripting engine, …) can tap in without coupling to each other.

§Subscription timing

Broadcast channels do not replay history for late subscribers — only events sent after a subscription are observable. Subscribe via EventBus::subscribe before any code that may publish events of interest, typically before calling Session::run.

Structs§

EventBus
Multi-producer, multi-consumer event hub.

Enums§

Event
One unit of work that flowed through (or originated inside) a session.

Constants§

DEFAULT_BUS_CAPACITY
Default channel capacity. Large enough to absorb burst traffic from 3 Mbaud ports while keeping memory bounded; lagging subscribers see broadcast::error::RecvError::Lagged and can resync.