An relic specific interface for bi-directional communication over web-sockets.
Properties
-
events
→ Stream<
WebSocketEvent> -
A Stream of
WebSocketEventreceived from the peer.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the web-socket is closed.
no setter
- pingInterval ↔ Duration?
-
The interval at which ping frames are sent to keep the web-socket
connection alive.
getter/setter pair
- protocol → String
-
The WebSocket subprotocol negotiated with the peer.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
[int? code, String? reason]) → Future< void> -
Closes the WebSocket connection and the
eventsStream.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendBytes(
Uint8List b) → void -
Sends binary data to the connected peer.
inherited
-
sendText(
String s) → void -
Sends text data to the connected peer.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryClose(
[int? code, String? reason]) → Future< bool> -
Try to close the WebSocket connection and the
eventsStream. -
trySendBytes(
Uint8List b) → bool -
Sends binary data to the peer, unless connection is already
closed (either through
closeor by the peer). Returnsfalseif connection is known to be closed, otherwisetrue. -
trySendText(
String s) → bool -
Sends text data to the peer, unless connection is already
closed (either through
closeor by the peer). Returnsfalseif connection is known to be closed, otherwisetrue.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited