ConnectionStateMachine class
Manages the QUIC connection lifecycle state machine.
Throws StateError for invalid state transitions and emits state changes via onStateChanged.
Constructors
- ConnectionStateMachine()
- Creates a connection state machine starting in ConnectionState.idle.
Properties
- canReceiveData → bool
-
truewhen the endpoint is allowed to receive application data.no setter - canSendData → bool
-
truewhen the endpoint is allowed to send application data.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
trueonce the connection has fully terminated.no setter - isClosing → bool
-
trueafter this endpoint has initiated a graceful close.no setter - isDraining → bool
-
trueafter a CONNECTION_CLOSE was received from the peer.no setter - isEstablished → bool
-
trueonce the handshake has completed and application data may flow.no setter - isHandshaking → bool
-
truewhile the TLS handshake and address validation are in progress.no setter - isIdle → bool
-
truewhile the connection has not yet started handshaking.no setter -
onStateChanged
→ Stream<
ConnectionState> -
Listen to state changes.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → ConnectionState
-
Current connection lifecycle state.
no setter
Methods
-
dispose(
) → void - Disposes the underlying state-change stream controller.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transitionTo(
ConnectionState newState, {String? reason}) → void -
Transitions the connection to
newState.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited