Exemple #1
0
 public static void HostSendMessage(NetConnection client,KSPPacket packet)
 {
     NetOutgoingMessage om = netServer.CreateMessage();
     om.Write((byte)packet.MessageType);
     packet.Encode(om);
     client.SendMessage(om, NetDeliveryMethod.ReliableOrdered, 0);
 }
Exemple #2
0
 public static void HostSendToAll(KSPPacket packet, NetConnection except = null)
 {
     NetOutgoingMessage om = netServer.CreateMessage();
     om.Write((byte)packet.MessageType);
     packet.Encode(om);
     if (except != null)
     {
         netServer.SendToAll(om, except, NetDeliveryMethod.ReliableOrdered, 0);
     }
     else
     {
         netServer.SendToAll(om, NetDeliveryMethod.ReliableOrdered);
     }
 }
Exemple #3
0
 public static void ClientSendMessage(KSPPacket packet)
 {
     NetOutgoingMessage om = netClient.CreateMessage();
     om.Write((byte)packet.MessageType);
     packet.Encode(om);
     netClient.SendMessage(om, NetDeliveryMethod.ReliableOrdered);
 }