WebSocketHubLink class
A HubLink over a package:web_socket_channel socket.
The default client link: it works on the VM and in the browser.
- Implemented types
Constructors
- WebSocketHubLink(WebSocketChannel _channel)
Properties
- closeCode → int?
-
The code the far end closed with, once stream is done.
no setteroverride
- closeReason → String?
-
The reason the far end closed with, once stream is done.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- isOpen → bool
-
Whether add still goes anywhere.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
stream
→ Stream<
Object?> -
Inbound frames. Single-subscription; done when the link closes.
no setteroverride
Methods
-
add(
Object data) → void -
Sends one frame: a
Stringor aList<int>.override -
close(
[int? code, String? reason]) → Future< void> -
Closes the link, telling the far end
codeandreason.override -
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
Static Methods
-
connect(
Uri uri, {Duration timeout = const Duration(seconds: 10)}) → Future< WebSocketHubLink> -
Dials
uriand waits for the socket to open.