sendToClinet method
Sends data to a specific client by ID.
The id
parameter is the ID of the client to receive the message.
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 sendToClinet(
String id,
dynamic data, {
int status = 200,
String? path,
}) async {
if (session.existClient(id)) {
session.getClient(id)!.send(data, status: status, path: path);
}
}