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
true when the endpoint is allowed to receive application data.
no setter
canSendData bool
true when the endpoint is allowed to send application data.
no setter
hashCode int
The hash code for this object.
no setterinherited
isClosed bool
true once the connection has fully terminated.
no setter
isClosing bool
true after this endpoint has initiated a graceful close.
no setter
isDraining bool
true after a CONNECTION_CLOSE was received from the peer.
no setter
isEstablished bool
true once the handshake has completed and application data may flow.
no setter
isHandshaking bool
true while the TLS handshake and address validation are in progress.
no setter
isIdle bool
true while 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