BenVlodgi

simplistic InitiateSendTransmission

Feb 7th, 2014
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1.         private bool InitiateSendTransmission(Transmission transmission, Contact contact)
  2.         {
  3.             string id = CreateNewID();
  4.             ControlTransferRequest ctr = new ControlTransferRequest(id, CreateNewKeyForRequest(id), LocalIPAddress());
  5.  
  6.             if (TryIPs(contact, delegate(string ip)
  7.             {
  8.                 return SendMessage(ctr.GetBytes(), ip, CONTROL_PORT) > 0;
  9.             }))
  10.                 return true;
  11.             else
  12.             {
  13.                 _sendingPublicKeysDictionary.Remove(id);
  14.                 return false;
  15.             }
  16.         }
Advertisement
Add Comment
Please, Sign In to add comment