TheOnionBay / TORrents

📄 🔒 "Torrents" over TOR
3 stars 0 forks source link

Tracker messages #16

Closed TheoVerhelst closed 5 years ago

TheoVerhelst commented 5 years ago

I implemented basic functions of the tracker. I could locally test the handle_new_client method by running in a shell

curl -H 'Content-Type: application/json' -d '{"CID": 42, "payload":{"type":"ls","files":[{"name":"Hi"},{"name":"There!"}]}}' http://0.0.0.0:5000

And the two files indeed showed up in the browser at 0.0.0.0:5000 with localhost as IP and the CID 42 :+1: I just had to comment out the response from the tracker with the list of files in order to do this test.

The code in the class Tracker could be used to patch Node and Client, since having the routes inside of the class is much cleaner.

carlosgeos commented 5 years ago

I've merged.

This time with a rebase commit (I like it better, only the three commits from this PR appear, and not a 4th one from me with all the changes).

I am going to test it with the online version