SocketManager constructor
SocketManager(
- WaServer server, {
- SocketEvent? event,
- Map<
String, SocketEvent> routes = const {},
Constructs a SocketManager instance with the specified server and optional event handlers.
The server
parameter is required and represents the server instance.
The event
parameter is optional and allows setting up event handlers.
The routes
parameter is optional and allows setting up route-based event handling.
Implementation
SocketManager(
this.server, {
this.event,
this.routes = const {},
}) {
server.socketManager = this;
}