Ejemplo n.º 1
0
 private void GetFileFromPeer(string contact, int fileid,string localPath,string address, ushort port, string localUserName)
 {
     PeerClientData data =  new PeerClientData(contact,fileid,"","",null);
         data.PeerAddress = address;
         data.PeerPort = port;
         data.LocalUserName = localUserName;
         data.Alias = localPath;
         ConnectToPeerServer(data);
         while (inIteration) ;
         _receiverTransfers.Add(data.Socket, data);
 }
Ejemplo n.º 2
0
 private void ConnectToPeerServer(PeerClientData data)
 {
     data.Socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
     data.Socket.Connect(data.PeerAddress, data.PeerPort);
 }