【问题标题】:C# downloading torrent with MonoTorrentC# 使用 MonoTorrent 下载 torrent
【发布时间】:2014-07-20 19:35:58
【问题描述】:

我正在尝试使用MonoTorrent 下载种子,问题是当我查看wireshark 中的网络流量时,客户端似乎甚至没有尝试联系跟踪器。它可以正确读取 torrent 文件,并且 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();
}

非常感谢任何帮助,或者如果有人知道一些替代方法

【问题讨论】:

    标签: c# mono download monotorrent torrent


    【解决方案1】:

    您的代码对我有用。确保您没有创建私人种子。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-09-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多