sendToAll method
Sends data to all connected clients.
The data
parameter is the message to be sent.
The optional status
parameter represents the HTTP status code.
The optional path
parameter represents the message path or route.
Implementation
Future sendToAll(dynamic data, {int status = 200, String? path}) async {
for (var client in session.getAllClients().values) {
client.send(data, status: status, path: path);
}
}