예제 #1
0
 public void SendToALL(GSPacketIn pkg, ServerClient except)
 {
     ServerClient[] list = GetAllClients();
     if (list != null)
     {
         foreach (ServerClient client in list)
         {
             if (client != except)
             {
                 client.SendTCP(pkg);
             }
         }
     }
 }
예제 #2
0
        public new ServerClient[] GetAllClients()
        {
            ServerClient[] list = null;

            lock (_clients.SyncRoot)
            {
                list = new ServerClient[_clients.Count];
                _clients.Keys.CopyTo(list, 0);
            }
            return list;
        }