我正在尝试用MonoTorrent下载torrent,问题是当我在wireshark中查看网络流量时,客户端似乎甚至没有尝试联系跟踪器。它可以正确读取torrent-file,并且visual studio不会显示任何错误。
这是我使用的代码:
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();
}我真的很感谢任何人的帮助,或者如果有人知道一些替代方案
发布于 2015-05-24 20:36:07
你的代码很适合我。请确保您没有创建私人torrent。
https://stackoverflow.com/questions/24854169
复制相似问题