Пример #1
0
 public void BroadcastMessage(HaProtoImpl.Opcode type, HaProtoImpl.HaProtoPacket packet, Client exempt = null)
 {
     byte[] data = packet.Build();
     lock (clients)
     {
         for (int i = 0; i < clients.Count; i++)
         {
             Client c = clients[i];
             if (c == exempt)
                 continue;
             HaProtoImpl.Send(c.Socket, type, data);
         }
     }
 }
Пример #2
0
 public static void Send(Socket s, Opcode type, HaProtoImpl.HaProtoPacket x)
 {
     Send(s, type, x.Build());
 }