Skip to content

Client.Peer

Adrian Macal edited this page Mar 29, 2017 · 3 revisions

Sometimes there is a neccessity to communicate directly with one peer. This namespace provides PeerHelper and PeerClient classes to support you in such non-typical scenarios. Both classes encapsulate the communication and the persistence.

Hit and run

using Leak.Client;
using Leak.Client.Peer;
using Leak.Common;

string destination = "d:\\leak";
NotificationCallback callback = Console.WriteLine;

PeerAddress remote = new PeerAddress("195.154.118.14", 51413);
FileHash hash = FileHash.Parse("73b38c5f82a28d47efef94c04d0a839b180f9ca0");

PeerHelper.Download(destination, hash, tracker, callback);
Clone this wiki locally