Skip to main content

Module core

Module core 

Source
Expand description

Pure client-side signaling state machine for the o-sfu protocol.

ProtocolCore performs no I/O. Each transition returns ordered Command values for the host to execute before reporting follow-up events. This keeps transitions deterministic and lets Wasm, native and test hosts share the same lifecycle rules.

Modulesยง

connection_lifecycle ๐Ÿ”’
socket lifecycle transitions for ProtocolCore
outbound_batch ๐Ÿ”’
request_flow ๐Ÿ”’
request_tracker ๐Ÿ”’
tracks in-flight recording requests and their timeout timers
server_events ๐Ÿ”’
sticky_replay ๐Ÿ”’
timers ๐Ÿ”’
request timeout timer identity for the protocol core

Structsยง

ConnectContext ๐Ÿ”’
PendingNegotiation ๐Ÿ”’
PendingRequest
ProtocolCore
The stored state falls into three groups:

Enumsยง

Command
One ordered side effect for the host that drives ProtocolCore.
ConnectionState
NegotiationKind
NegotiationRejection ๐Ÿ”’
NegotiationSlot ๐Ÿ”’
PendingRequestKind ๐Ÿ”’
ProtocolEvent
ProtocolPhase ๐Ÿ”’

Constantsยง

BATCH_FLUSH_DELAY_MS ๐Ÿ”’
BATCH_FLUSH_TIMER_ID ๐Ÿ”’
INITIAL_RECOVERY_DELAY_MS ๐Ÿ”’
MAX_OUTBOUND_BATCH_LEN ๐Ÿ”’
MAX_RECOVERY_DELAY_MS ๐Ÿ”’
RECOVERY_TIMER_ID
host-facing timer id used by the recovery backoff scheduler
REQUEST_TIMEOUT_MS ๐Ÿ”’

Functionsยง

close_for_protocol_error ๐Ÿ”’
empty_features ๐Ÿ”’
next_recovery_delay ๐Ÿ”’
Grows reconnect delay by 1.5x while keeping the backoff bounded.

Type Aliasesยง

Commands ๐Ÿ”’