Example #1
0
 public void Disconnect(Client client)
 {
     lock(_clients)
     {
         _clients.Remove(client);
     }
     if( OnClientListChange != null ) OnClientListChange();
 }
Example #2
0
        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);
            }
        }