WebSocketService class
Constructors
- WebSocketService({required String webSocketUrl, required String authUrl, required String channelName})
Properties
- authUrl → String
-
final
- channelName → String
-
Channel name
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
messages
→ Stream<
String> -
Get message stream
no setter
- onEventReceived ↔ dynamic Function(String)?
-
Callback function for event handling
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- webSocketUrl → String
-
WebSocket and Authentication URL
final
Methods
-
close(
) → void - Close WebSocket connection
-
connect(
) → void - Connect to WebSocket server
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reconnect(
) → void - Reconnect WebSocket on error
-
setOnEventReceivedCallback(
dynamic callback(String)) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited