public void Disconnect(Client client) { lock(_clients) { _clients.Remove(client); } if( OnClientListChange != null ) OnClientListChange(); }
public void WriteOther(Client sender, string message) { Client[] clients = null; lock(_clients) clients = _clients.ToArray(); foreach(var client in clients) { if( client == sender ) continue; client.Write( message); } }