WebSocketClientState class sealed

Whether the stream controller is permanently closed.

The controller becomes closed by calling the close method.

If the controller is closed, the "done" event might not have been delivered yet, but it has been scheduled, and it is too late to add more events. A future which is completed when the stream controller is done. WebSocket client state.

{@category Client} {@category Entity}

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.
const
factory
WebSocketClientState.connecting({required String url})
Connection has not yet been established. WebSocket client state.
const
factory
WebSocketClientState.disconnecting({required int? closeCode, required String? closeReason})
Connection is in the process of closing. WebSocket client state.
const
factory
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.
const
factory

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