Skip to content

Client.Swarm

Adrian Macal edited this page Mar 23, 2017 · 5 revisions

Communication with other peers in the entire swarm is the main principle of the torrent world. This namespace provides SwarmHelper and SwarmClient classes to support you in typical collaboration with other peers. Both classes encapsulate the communication and the persistence and provide you the easy access to the torrent world.

Hit and run

Connecting to the swarm and grabbing the resource can be done in the following lines of code.

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

string tracker = "http://bttracker.debian.org:6969/announce";
FileHash hash = FileHash.Parse("883c6f02fc46188ac17ea49c13c3e9d97413a5a2");

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