Skip to content

Commit af98aa7

Browse files
committed
readme
1 parent edf03ed commit af98aa7

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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

4546
client.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.**

0 commit comments

Comments
 (0)