You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to download some files and both with the SampleClient, and using the code below, it always stays at Downloading, and 0 percent.
I've tried downloading various torrents including Linux distros.
What could cause this?
Console.WriteLine("Torrent test...");
Torrent t = Torrent.Load("/path/to/torrent");
TorrentSettings s = new TorrentSettings();
s.MaxConnections = 100;
s.InitialSeedingEnabled = true;
s.MaxDownloadSpeed = 500;
s.MaxUploadSpeed = 100;
s.UploadSlots = 4;
s.EnablePeerExchange = true;
s.UseDht = true;
TorrentManager tm = new TorrentManager(t, "/path/to/save/location", s);
EngineSettings es = new EngineSettings();
es.AllowedEncryption = EncryptionTypes.All;
es.ListenPort = 22239; // forwarded, both UDP and TCP
es.PreferEncryption = true;
ClientEngine engine = new ClientEngine(es);
engine.Register(tm);
tm.Start();
Console.WriteLine(engine.IsRunning); // outputs True
while (true)
{
Console.WriteLine(tm.State.ToString() + ", " + tm.Progress); // just keeps outputting "Downloading, 0"
System.Threading.Thread.Sleep(1000);
}
The text was updated successfully, but these errors were encountered:
Try putting break points in these key places and see if the code is getting hit :
TrackerManager.Announce << did it even try to announce
TrackerManager.OnAnnounceComplete << did the announce go through
SocketListener.EndAccept << anyone try to connect to you
ConnectionManager.ConnectToPeer << did you try to connect to anyone else
My guess is that your announce is getting blocked or not returning any peers. See if you get any peers back in OnAnnounceComplete.
I'm trying to download some files and both with the SampleClient, and using the code below, it always stays at Downloading, and 0 percent.
I've tried downloading various torrents including Linux distros.
What could cause this?
The text was updated successfully, but these errors were encountered: