XTransportWsClient class

Constructors

XTransportWsClient.from(String _host, String _path, int _port, {bool log = false, Iterable<String>? protocols, XtransportCredentials credentials = const XtransportCredentials.insecure()})

Properties

credentials XtransportCredentials
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
log bool
should log
getter/setter pair
protocols Iterable<String>?
websocket protocols, in mqtt,it should contain mqtt
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status ↔ ConnectStatus
connectStatus disconnect, connecting, connected, paused
getter/setter pair

Methods

close() → void
close the socket
connect({String? host, int? port, Duration? duration, Duration? deadline}) Future<void>
WS connect
getConnectionSocket({Duration? duration}) Future<WebSocket>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onClose(void fn()) → void
onClose Event Handler
onConnect(void fn()) → void
onClose Event Handler
onError(void fn(Error err)) → void
onError Event Handler
onMessage(void fn(Message msg)) → void
onMessage Event Handler
send(ITransportPacket obj) → void
send a Packet to connection ioSink
toString() String
A string representation of this object.
inherited

Operators

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