SocketEvent constructor
SocketEvent({
- dynamic onConnect(
- SocketClient socket
- dynamic onDisconnect(
- SocketClient socket
- dynamic onError(
- SocketClient socket,
- Map<
String, dynamic> data
- dynamic onMessage(
- SocketClient socket,
- Map<
String, dynamic> data
Constructs a SocketEvent instance with optional event handlers.
The onConnect
, onDisconnect
, onError
, and onMessage
parameters
are optional callbacks for handling respective WebSocket events.
Implementation
SocketEvent({
this.onConnect,
this.onDisconnect,
this.onError,
this.onMessage,
});