IORelicWebSocket class
A dart-io-based RelicWebSocket implementation.
- Implemented types
Properties
-
events
→ Stream<
WebSocketEvent> -
A Stream of
WebSocketEventreceived from the peer.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool
-
Whether the web-socket is closed.
no setteroverride
- pingInterval ↔ Duration?
-
The interval at which ping frames are sent to keep the web-socket
connection alive.
getter/setter pairoverride
- protocol → String
-
The WebSocket subprotocol negotiated with the peer.
no setter
- 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 events
Stream. -
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.
-
sendText(
String s) → void - Sends text data to the connected peer.
-
toString(
) → String -
A string representation of this object.
inherited
-
tryClose(
[int? code, String? reason]) → Future< bool> -
Try to close the WebSocket connection and the events
Stream.override -
trySendBytes(
Uint8List b) → bool -
Sends binary data to the peer, unless connection is already
closed (either through close or by the peer). Returns
falseif connection is known to be closed, otherwisetrue.override -
trySendText(
String s) → bool -
Sends text data to the peer, unless connection is already
closed (either through close or by the peer). Returns
falseif connection is known to be closed, otherwisetrue.override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
connect(
Uri url, {Iterable< String> ? protocols}) → Future<IORelicWebSocket> - Create a new RelicWebSocket connection using dart:io WebSocket.
-
fromHttpRequest(
HttpRequest request) → Future< IORelicWebSocket>