WebSocketChannelAdapter class
WebSocket adapter implementation using the web_socket_channel package
- Implemented types
Constructors
Properties
- config → WebSocketConfig
-
Configuration used for this adapter
no setteroverride
- currentState → WebSocketState
-
Current connection state
no setteroverride
- errorStream → Stream
-
Stream of connection errors
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Checks if the connection is closed
no setteroverride
- isConnected → bool
-
Checks if the connection is currently active
no setteroverride
- isConnecting → bool
-
Checks if the connection is in a connecting state
no setteroverride
- isWeb → bool
-
no setter
-
messageStream
→ Stream<
WebSocketMessage> -
Stream of incoming messages
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stateStream
→ Stream<
WebSocketState> -
Stream of connection state changes
no setteroverride
Methods
-
connect(
) → Future< void> -
Establishes a WebSocket connection
override
-
disconnect(
[int? code, String? reason]) → Future< void> -
Closes the WebSocket connection
override
-
dispose(
) → Future< void> -
Disposes of the adapter and cleans up resources
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
dynamic data) → Future< void> -
Sends raw data through the WebSocket
override
-
sendMessage(
WebSocketMessage message) → Future< void> -
Sends a message through the WebSocket
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited