WebSocketClient class

Default WebSocketClient used for socket connection. To use the default WebSocketClient, extends the class and override the required functions.

Inheritance

Constructors

WebSocketClient()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state → WebSocketClientState
Returns the state of the web socket client.
no setteroverride

Methods

close() Future
Closes the web socket client.
override
connect({required String uri, String protocol = "duo-instance", Map<String, dynamic>? headers}) Future<void>
Connects to the server using the given uri and protocol.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
read() Future
Reads a message from the web socket.
override
reset() Future<void>
Resets the web socket client.
override
send(dynamic message) Future<void>
Sends a message to the web socket.
override
toString() String
A string representation of this object.
inherited
waitRemoteClose() Future<int?>
Waits for the remote to close the web socket.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited