Esempio n. 1
0
 public void SendPacket(Packet pkt, bool secure)
 {
     NetOutgoingMessage outMsg = client.CreateMessage();
     pkt.encode(ref outMsg);
     if(secure)
         client.SendMessage(outMsg, NetDeliveryMethod.ReliableUnordered);
     else
         client.SendMessage(outMsg, NetDeliveryMethod.Unreliable);
 }
Esempio n. 2
0
 private void SendPktToAll(Packet pkt, bool secure)
 {
     NetOutgoingMessage outMsg = server.CreateMessage();
     pkt.encode(ref outMsg);
     if (secure)
         server.SendToAll(outMsg, NetDeliveryMethod.ReliableOrdered);
     else
         server.SendToAll(outMsg, NetDeliveryMethod.Unreliable);
 }