WebsocketManager class
Provides an easy way to create native websocket connection.
Constructors
-
WebsocketManager(String url, Map<
String, String> header)
Properties
Methods
-
close(
) → Future< void> - Closes the web socket connection.
-
connect(
) → Future< void> - Creates a new WebSocket connection after instantiated WebsocketManager.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onClose(
dynamic callback(dynamic)) → void - Adds a callback handler to this WebSocket close event.
-
onMessage(
dynamic callback(dynamic)) → void - Adds a callback handler to this WebSocket sent data.
-
send(
String message) → void - Send a String message to the connected WebSocket.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited