public void AddClient(Client client) { lock (_clients) { _clients.Add(client); } }
private void listenSocket_DidAccept(AsyncSocket sender, AsyncSocket newSocket) { Client client = new Client(newSocket); Clients.Instance.AddClient(client); }
public void RemoveClient(Client client) { lock (_clients) { _clients.Remove(client); } }