WebSocketListener class abstract
Client code should implement this interface in order to receive async calls from WebSocket implementation from underlying OS.
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
read-onlyinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onByteArrayMessage(
Uint8List message) → void -
Invoked when a binary (type
0x2
) message has been received. -
onError(
Exception exception) → void - Invoked when error occurs in transport between dart and platform.
-
onStringMessage(
String message) → void -
Invoked when a text (type
0x1
) message has been received. -
onWsClosed(
int code, String reason) → void - Invoked when both peers have indicated that no more messages will be transmitted and the connection has been successfully released. No further send/receive calls is possible. All resources like WebSocketConnection should be released after this.
-
onWsClosing(
int code, String reason) → void - Invoked when the remote peer has indicated that no more incoming messages will be transmitted. All resources like WebSocketConnection should be released after this.
-
onWsOpened(
WebSocketConnection webSocketConnection) → void - Invoked when a web socket has been accepted by the remote peer and may begin transmitting messages. Only after this method is invoked, client is able to send/receive ws messages. Returned WebSocketConnection can be used to send text/byte messages to server as long as connection is still active (unless onWsClosing or onWsClosed are called)
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited