torrent icon indicating copy to clipboard operation
torrent copied to clipboard

Help Request: Running a test torrent

Open seanwestfall opened this issue 8 years ago • 1 comments

Hey Jakub, Read your article on chaps.io and though it was pretty awesome. I wanted to try compiling your code and seeing how it downloads a torrent. I couldn't get master to compile (as of today) but I pulled the code from before your last commit (980bbaf4ce3c351bd7aa6846125277b9a84d479b) and got it to compile with GHC 8.2.1. When I run it as is with a test torrent file, as below, it pauses for a pretty long time after printing "peer connected":

/x86_64-osx/nightly-2017-11-21/8.2.1/bin/torrent ./test.torrent
["./test.torrent"]
Setting phasers to stun... (port 8036) (ctrl-c to quit)
peer connected
peer connected
peer connected
^Cquiting cleanup
torrent: thread killed

It never does anything past the "peer connected" message.

am I using the wrong format for the CL arguments (should I be using full paths, cause I tried that and that didn't change anything). I could probably figure it out on my own, but it's just faster if I ask for help.

seanwestfall avatar Dec 30 '17 03:12 seanwestfall

Hey Sean,

A few commits behind should be fine, I am currently vectorizing I/O so I might introduce bugs on latest master.

You're using the arguments correctly, the problem may be with a specific torrent. Right now, it doesn't support DHT or magnet links and does a poor job of talking to the tracker. This makes it a bad choice for large scale public trackers and also private trackers (because of unknown user agent). I test it mostly on small, public torrents like the ones here.

Can you try one of these and see if it works?

farnoy avatar Jan 02 '18 13:01 farnoy