getUserClientsSocket method
Retrieves a list of SocketClient instances associated with a specific user ID.
The userID
parameter is the ID of the user. Returns a list of SocketClient instances associated
with the user.
Implementation
List<SocketClient> getUserClientsSocket(String userID) {
var allID = _users[userID] ?? [];
var res = <SocketClient>[];
for (var id in allID) {
if (_clients.containsKey(id)) {
res.add(_clients[id]!);
}
}
return res;
}