KsSocket class abstract

A library for websocket communication.

Constructors

KsSocket.new()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket → dynamic
Object socket utility for communication.
For implementation advanced.
no setter
url String
Connection address
no setter

Methods

close() Future<void>
Close this WebSocket connection.
listen(void onData(dynamic message), [bool decodeJson = true]) → void
On each data event from this stream, the subscriber's onData handler is called
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send(Object data) → void
Send message to server.
Convert Object to json and send.
toString() String
A string representation of this object.
inherited
write(dynamic message) → void
Send message to server (no conversion).
message is String or List<int>

Operators

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

Static Methods

connect(String host, int port) Future<KsSocketImpl>
Create a new WebSocket connection. The URL supplied in host and port