Expand description
worker-local slots for packet-loop identities
slots solve the mismatch between stable transport ids and packet-loop work
room commands, diagnostics and teardown
use stable public keys such as TransportSessionKey or TransportMediaId
those keys are meaningful outside one media worker
packet-loop queues, timeout heaps and route destinations
use tiny copy handles
those handles are only meaningful inside the store that created themthe worker must accept that some work is already queued when a session,
media entry or consumer route is removed
a bare index would let that delayed work reach a replacement occupant after
the index is recycled
SlotHandle prevents that by pairing the index with the generation that was
current when the handle was created
removal advances the generation before reuse, so stale dirty-session marks,
timeout heap entries and route destinations become ordinary no-ops instead
of touching new state
the tag parameter is part of the contract it keeps session handles, media handles and consumer stream handles in separate type namespaces even though every handle is represented by the same compact index plus generation pair
Structsยง
- Consumer
Stream ๐Slot - handle namespace for downstream RTP rewrite state
- Keyed
Slot ๐ - Keyed
Slot ๐Store - public-key index backed by generation slots
- Media
Slot ๐ - handle namespace for registered media entries
- Session
Slot ๐ - handle namespace for live
RtcSessionStateentries - Slot
Entry ๐ - Slot
Handle ๐ - copy identity for one reusable worker-local slot
- Slot
Store ๐ - dense reusable storage for one worker-local identity class
Functionsยง
- next_
generation ๐
Type Aliasesยง
- Consumer
Stream ๐Handle - generation-checked handle stored on route destinations for local RTP rewrite state
- Media
Store ๐ - media table keyed by the stable transport media id exposed outside the worker
- Session
Handle ๐ - generation-checked session handle used by packet-loop scheduler queues
- Session
Store ๐ - session table keyed by the public session identity at the worker boundary