SessionsWebSocketCallbacks class
Callbacks for SessionsWebSocket lifecycle events.
Constructors
- SessionsWebSocketCallbacks({required void onMessage(SessionsMessage message), void onClose()?, void onError(Object error)?, void onConnected()?, void onReconnecting()?})
-
Create callbacks for SessionsWebSocket.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onClose → void Function()?
-
Called when the connection is permanently closed (server ended or
reconnection attempts exhausted).
final
- onConnected → void Function()?
-
Called when the connection is established (or re-established).
final
- onError → void Function(Object error)?
-
Called when a WebSocket error occurs.
final
- onMessage → void Function(SessionsMessage message)
-
Called when a valid SessionsMessage is received.
final
- onReconnecting → void Function()?
-
Fired when a transient close is detected and a reconnect is scheduled.
onClose fires only for permanent close.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited