ConnectionService class

This class is responsible for ws connection establishments

Supports ws and wss

Constructors

ConnectionService(ConnectionOptions _options)
Connection options is required. Defining callbacks is not necessary

Properties

hashCode int
The hash code for this object.
no setterinherited
isConnected bool
no setter
onDisconnect ↔ PublishSubject<void>
This callback will be called when connection is closed
getter/setter pair
onMessage ↔ PublishSubject<String>
This callback will be called when we receive a message from server
getter/setter pair
onOpen ↔ PublishSubject
This callback will be called when connection is opened
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect() Future
Start opening websocket connection
disconnect() → void
Close current websocket connection
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
probe() → void
Send network probe to check if connection is indeed live
sendText(String str) → void
Send a message through websocket websocket connection
toString() String
A string representation of this object.
inherited

Operators

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