« Previous - Version 3/18 (diff) - Next » - Current version
olivier dufour, 04/08/2009 08:58 AM


Client example



ClientEngine engine = new ClientEngine(new EngineSettings(downloadsPath, port));

//DHT
DhtListener dhtListner = new UdpListener (new IPEndPoint (IPAddress.Any, port));
DhtEngine dht = new DhtEngine (dhtListner);
engine.RegisterDht(dht);
dhtListner.Start();
//byte array of dht nodes 
engine.DhtEngine.Start(nodes);

torrent = Torrent.Load("test.torrent");
TorrentManager manager = new TorrentManager(torrent, downloadsPath, torrentDefaults);

//FastResume code need a BencodedDictionnary
manager.LoadFastResume(new FastResume (BEncDictFastResume));

engine.Register(manager);
manager.Start ();


Also available in: HTML TXT