MonoTorrent 和元数据模式
MonoTorrent 客户端不会使用 matadata 模式从另一个对等点下载文件:
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 DhtEngine(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();
如果我使用 torrent 文件插入元数据,一切都会正常工作。
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 DhtEngine(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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
基本上,MonoTorrent 的 DHT 实现已严重损坏。我已经能够让它工作(部分),但重新实现它比修复它更好。
我也有兴趣让 MonoTorrent 工作......
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...