UFSocket class
Socket.IO client used by apps via:
final socket = await UFSocket.initialize();
socket.listen('event_name', (data) { ... }, (error) { ... });
socket.emit('event_name', payload, (response) { ... }, (error) { ... });
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isConnected → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
disconnect(
) → void -
dispose(
) → void -
emit(
{required String event, dynamic data, void onResponse(dynamic response)?, void onError(dynamic response)?}) → void -
listen(
{required String event, void onData(dynamic response)?, void onError(dynamic response)?}) → Stream -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
off(
String event) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- interceptors → SocketInterceptorManager
-
final
- rawSocket → Socket?
-
no setter
Static Methods
-
initialize(
) → Future< UFSocket>