WebSocketClient class

Constructors

WebSocketClient(String url, {Iterable<String>? protocols, Map<String, dynamic>? headers, CompressionOptions compression = CompressionOptions.compressionDefault, HttpClient? customClient, Duration? pingInterval, String eventNameUpdate = "update", String eventNameConnection = "connection", String eventNameInvoke = "invoke"})

Properties

compression CompressionOptions
getter/setter pair
customClient HttpClient?
getter/setter pair
event_name_connection String
getter/setter pair
event_name_invoke String
getter/setter pair
event_name_update String
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>?
getter/setter pair
isConnect bool
getter/setter pair
pingInterval Duration?
getter/setter pair
protocols Iterable<String>?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
socket WebSocket
getter/setter pair
url String
getter/setter pair

Methods

add({required dynamic value, Duration durationTimeOut = const Duration(minutes: 1), Duration durationDelay = const Duration(milliseconds: 1)}) Future<void>
connect({required Future<void> onSocketData(dynamic data), required FutureOr<void> onSocketConnection(SocketConnection socketConnection), Duration delayDuration = const Duration(milliseconds: 500)}) Future<void>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send({required List<int> value, Duration durationTimeOut = const Duration(minutes: 1), Duration durationDelay = const Duration(milliseconds: 1)}) Future<void>
sendSync({required List<int> value, Duration durationTimeOut = const Duration(minutes: 1), Duration durationDelay = const Duration(milliseconds: 1)}) → void
toString() String
A string representation of this object.
inherited

Operators

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