Send() public method

public Send ( byte buffer, int data_length, System ep ) : int
buffer byte
data_length int
ep System
return int
Example #1
0
 // Send a Frame to each registered foreign devices, except the original sender
 private void SendToFDs(byte[] buffer, int msg_length, Net.IPEndPoint EPsender = null)
 {
     lock (ForeignDevices)
     {
         // remove oldest Device entries (Time expiration > TTL + 30s delay)
         ForeignDevices.Remove(ForeignDevices.Find(item => DateTime.Now > item.Value));
         // Send to all others, except the original sender
         foreach (KeyValuePair <System.Net.IPEndPoint, DateTime> client in ForeignDevices)
         {
             if (!(client.Key.Equals(EPsender)))
             {
                 MyBBMDTransport.Send(buffer, msg_length, client.Key);
             }
         }
     }
 }