public void UpdateClient(Client client) { _clientsById.TryUpdate(client.ConnectionId, client, client); }
public void RemoveClient(Client client) { Client clientRemoved; _clientsById.TryRemove(client.ConnectionId, out clientRemoved); _clients.Group(client.SessionId).onUsersUpdated(GetClients(client.SessionId).Count()); }
public bool TryGetClient(string id, out Client client) { return _clientsById.TryGetValue(id, out client); }
public void AddClient(Client client) { _clientsById.TryAdd(client.ConnectionId, client); _clients.Group(client.SessionId).onUsersUpdated(GetClients(client.SessionId).Count()); }