Ejemplo n.º 1
0
 /**
  * Sends a data packet to the client and resends it until it has been received from the client
  *
  */
 public void SendQueuedDataPacket(Packet packet)
 {
     if(PacketQueue.ContainsKey(packetcount)){
         packet.SetPacketCount(new Triad(packetcount));
         PacketQueue[packetcount] = packet;
         packetcount++;
     }else{
         packet.SetPacketCount(new Triad(packetcount));
         PacketQueue.Add(packetcount, packet);
         packetcount++;
     }
 }
Ejemplo n.º 2
0
 /**
  * [Unsafe] Sends a direct data packet to the client without checking if it has been received
  *
  */
 public void SendDirectDataPacket(Packet packet)
 {
     packet.SetPacketCount(new Triad(packetcount));
     byte[] content = packet.Encode();
     PacketHandler.server.Send(content, content.Length, GetIPEndPoint());
 }