Example #1
0
        private void Send(int messageID, object data, IPEndPoint remoteIP)
        {
            SendCell cell = new SendCell(messageID, data);

            byte[] buffer = cell.ToBuffer();
            UdpPeer.Send(cell, remoteIP);
        }
Example #2
0
 public void Dispose()
 {
     if (_udpPeer != null)
     {
         _udpPeer.Dispose();
         _udpPeer = null;
     }
     if (_sendFileManagerList != null &&
         _sendFileManagerList.Count > 0)
     {
         foreach (SendFileManager sendFileManager
                  in _sendFileManagerList.Values)
         {
             sendFileManager.Dispose();
         }
         _sendFileManagerList.Clear();
     }
 }
Example #3
0
 public void Dispose()
 {
     if (_udpPeer != null)
     {
         _udpPeer.Dispose();
         _udpPeer = null;
     }
     if (_receiveFileManagerList != null &&
         _receiveFileManagerList.Count > 0)
     {
         foreach (ReceiveFileManager receiveFileManager
                  in _receiveFileManagerList.Values)
         {
             receiveFileManager.Dispose();
         }
         _receiveFileManagerList.Clear();
     }
 }
Example #4
0
 public void Start()
 {
     UdpPeer.Start();
 }