WebSocketClientState class sealed Client Entity
WebSocket client state.
- Implementers
- Annotations
-
- @immutable
Constructors
- WebSocketClientState()
-
WebSocket client state.
const
- WebSocketClientState.closed({required int? closeCode, required String? closeReason})
-
Connection has been closed or couldn't be opened.
WebSocket client state.
constfactory
- WebSocketClientState.connecting({required String url})
-
Connection has not yet been established.
WebSocket client state.
constfactory
- WebSocketClientState.disconnecting({required int? closeCode, required String? closeReason})
-
Connection is in the process of closing.
WebSocket client state.
constfactory
- WebSocketClientState.initial()
-
The initial state of the web socket client.
WebSocket client state.
factory
- WebSocketClientState.open({required String url})
-
Connection is open and ready to communicate.
WebSocket client state.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- readyState → WebSocketReadyState
-
Returns the current state of the connection.
0 : CONNECTING - Socket has been created. The connection is not yet open.
1 : OPEN - The connection is open and ready to communicate.
2 : CLOSING - The connection is in the process of closing.
3 : CLOSED - The connection is closed or couldn't be opened.
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