Skip to main content

Module connection_lifecycle

Module connection_lifecycle 

Source
Expand description

socket lifecycle transitions for ProtocolCore

connect starts a user attempt and clears replayable intent disconnect ends that attempt and suppresses recovery on_ws_close maps terminal codes to ConnectionState::Closed while transient closes preserve the connect context for handle_recovery_timer

welcome messages enter through ProtocolCore::on_ws_message transport readiness enters through ProtocolCore::on_transport_ready each transition returns ordered Command values for the host

Enumsยง

LifecycleCloseCause ๐Ÿ”’
host-visible reason attached to a terminal lifecycle state change

Functionsยง

connect ๐Ÿ”’
starts a fresh connection attempt from an inactive or recovering state
disconnect ๐Ÿ”’
ends the current user attempt on purpose
handle_recovery_timer ๐Ÿ”’
retries the saved websocket connection after a recovery delay
lifecycle_close_cause_label ๐Ÿ”’
returns the compatibility label exposed through EmitStateChange
on_ws_close ๐Ÿ”’
handles websocket closure after a user was already in flight
reset_public_state ๐Ÿ”’
state_change ๐Ÿ”’
terminal_close_cause ๐Ÿ”’
maps terminal websocket close codes to host-visible lifecycle causes