sendToUser method

  1. @override
void sendToUser(
  1. dynamic userId,
  2. String event,
  3. dynamic data
)
override

Send a message to a specific user (by user ID). The adapter is responsible for mapping user ID to client ID(s).

Implementation

@override
void sendToUser(dynamic userId, String event, dynamic data) {
  final clientId = _userClientMap[userId];
  if (clientId != null) {
    _clients[clientId]?.send(event, data);
  }
}