Reputation: 439
I'm trying to download a torrent with MonoTorrent, the problem is that when i look at the network traffic in wireshark it seems like the client is not even attempting to contact the tracker. It reads the torrent-file correctly and visual studio displays no errors.
This is the code i'm using:
public Form1()
{
EngineSettings settings = new EngineSettings();
settings.AllowedEncryption = EncryptionTypes.All;
settings.SavePath = Path.Combine(Environment.CurrentDirectory, "torrents");
if (!Directory.Exists(settings.SavePath))
Directory.CreateDirectory(settings.SavePath);
engine = new ClientEngine(settings);
engine.ChangeListenEndpoint(new IPEndPoint(IPAddress.Any, 6969));
Torrent torrent = Torrent.Load("C:/Users/xxx/Google Drive/WindowsFormsApplication1/WindowsFormsApplication1/bin/Debug/kontakt.torrent");
TorrentManager manager = new TorrentManager(torrent, engine.Settings.SavePath, new TorrentSettings());
engine.Register(manager);
manager.Start();
}
I really appreciate any help or if someone knows about some alternative
Upvotes: 4
Views: 6674
Reputation: 1058
Your code works for me. Make sure you didn't create a private torrent.
Upvotes: 0