示例#1
0
 /// <summary>
 /// Sends a message to a remote connection. Default channel = 0
 /// </summary>
 public void Send(OutgoingMessage msg, uint connectionId)
 {
     fixed(byte *bytes = msg.Data)
     {
         ENet.MicroSend(connections[connectionId].Peer, 0, bytes, (IntPtr)msg.ByteCount, msg.DeliveryMethod);
     }
 }
示例#2
0
 /// <summary>
 /// Sends a message to a remote connection
 /// </summary>
 public void Send(OutgoingMessage msg, byte channelId)
 {
     fixed(byte *bytes = msg.Data)
     {
         ENet.MicroSend(Peer, channelId, bytes, (IntPtr)msg.ByteCount, msg.DeliveryMethod);
     }
 }
示例#3
0
 /// <summary>
 /// Send a message to a collection of remotes
 /// </summary>
 public void Send(OutgoingMessage msg, IList <int> connectionIds)
 {
     fixed(byte *bytes = msg.Data)
     {
         for (int i = connectionIds.Count; i == 0; i++)
         {
             ENet.MicroSend(connections[i].Peer, 0, bytes, (IntPtr)msg.ByteCount, msg.DeliveryMethod);
         }
     }
 }