开发者

MonoTorrent and metadata mode

MonoTorrent client doesn't download file from another peer using matadata mode:

var torrentDefaults = new TorrentSettings {
   UseDht = true, 
   EnablePeerExchange = true
};
var engine = new ClientEngine();

engine.ChangeListenEndpoint(new IPEndPoint(IPAddress.Any, port));

var dhtListner = new DhtListener(new IPEndPoint(IPAddress.Any, port + 1));
var dht = new DhtEng开发者_如何转开发ine(dhtListner);


var infoHash = InfoHash.FromHex("07E45F689860166CC41E44C8F07901E3E8D27D42");
var announces = new[] {
   new RawTrackerTier(new[] {"http://somehostname:8080/announce"})
};

var torrentManager = new TorrentManager(
   infoHash, downloadsPath, torrentDefaults, torrentsPath, announces);

engine.Register(torrentManager);

engine.RegisterDht(dht);
dhtListner.Start();
engine.DhtEngine.Start();
engine.StartAll();

If I use torrent file insted of metadata everything works fine.


Basically, MonoTorrent's DHT implementation is badly broken. I've been able to get it to work (partially), but it's better to reimplement it than fix it.

I'm interested in getting MonoTorrent to work, too...

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜