WebsocketDS class
Data source for making websocket requests
Constructors
- WebsocketDS(WebSocketChannel webSocketChannel)
- create new instance of WebsocketDS
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- webSocketChannel → WebSocketChannel
-
the websocket channel
final
Methods
-
close(
) → Future< void> - close the websocket
-
closeCode(
) → int? - get the close code
-
closeReason(
) → String? - get the close reason
-
isOpen(
) → bool - check if the websocket is open
-
listen(
void onData(dynamic), {Function? onError, void onDone()?}) → StreamSubscription - listen to the websocket channel
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
ready(
) → Future< void> - signal that the websocket is ready
-
send(
dynamic data) → void - send data to the websocket channel
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited