Пример #1
0
 public void UpdateClient(Client client)
 {
     _clientsById.TryUpdate(client.ConnectionId, client, client);
 }
Пример #2
0
        public void RemoveClient(Client client)
        {
            Client clientRemoved;
            _clientsById.TryRemove(client.ConnectionId, out clientRemoved);

            _clients.Group(client.SessionId).onUsersUpdated(GetClients(client.SessionId).Count());
        }
Пример #3
0
 public bool TryGetClient(string id, out Client client)
 {
     return _clientsById.TryGetValue(id, out client);
 }
Пример #4
0
        public void AddClient(Client client)
        {
            _clientsById.TryAdd(client.ConnectionId, client);

            _clients.Group(client.SessionId).onUsersUpdated(GetClients(client.SessionId).Count());
        }