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.
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...