Skip to main content

fold_the_stream

Function fold_the_stream 

Source
async fn fold_the_stream(
    state: Arc<TransportState>,
    updates: UnboundedReceiver<SeatUpdate>,
)
Expand description

Fold the core’s stream into the live state and the conversations this transport holds.

One fold for the whole socket rather than one per connection, and it is what seeds a seat: Connected arrives here, emitted by the session task in its own order, so a conversation and the frames that follow it have one producer. It attaches at boot, before any session spawns, which is what lets every seat’s seal land on a copy.