File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ client.on('error', function (err) {
4040 // a tracker was unavailable or sent bad data to the client. you can probably ignore it
4141})
4242
43- client .start () // start getting peers from the tracker
43+ // start getting peers from the tracker
44+ client .start ()
4445
4546client .on (' update' , function (data ) {
4647 console .log (' got a response from tracker: ' + data .announce )
@@ -52,11 +53,14 @@ client.once('peer', function (addr) {
5253 console .log (' found a peer: ' + addr) // 85.10.239.191:48623
5354})
5455
55- client .complete () // announce that download has completed (and you are now a seeder)
56+ // announce that download has completed (and you are now a seeder)
57+ client .complete ()
5658
57- client .update () // force a tracker announce. will trigger more 'update' events and maybe more 'peer' events
59+ // force a tracker announce. will trigger more 'update' events and maybe more 'peer' events
60+ client .update ()
5861
59- client .stop () // stop getting peers from the tracker, gracefully leave the swarm
62+ // stop getting peers from the tracker, gracefully leave the swarm
63+ client .stop ()
6064```
6165
6266** TODO: Add a BitTorrent tracker server implementation to this package.**
You can’t perform that action at this time.
0 commit comments