mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-07 13:59:07 +00:00
Fix small typos in the readme example
This commit is contained in:
parent
231aed2ee6
commit
f6703254a2
@ -35,6 +35,7 @@ To connect to a tracker, just do this:
|
|||||||
```js
|
```js
|
||||||
var Client = require('bittorrent-tracker').Client
|
var Client = require('bittorrent-tracker').Client
|
||||||
var parseTorrent = require('parse-torrent')
|
var parseTorrent = require('parse-torrent')
|
||||||
|
var fs = require('fs')
|
||||||
|
|
||||||
var torrent = fs.readFileSync(__dirname + '/torrents/bitlove-intro.torrent')
|
var torrent = fs.readFileSync(__dirname + '/torrents/bitlove-intro.torrent')
|
||||||
var parsedTorrent = parseTorrent(torrent) // { infoHash: 'xxx', length: xx, announce: ['xx', 'xx'] }
|
var parsedTorrent = parseTorrent(torrent) // { infoHash: 'xxx', length: xx, announce: ['xx', 'xx'] }
|
||||||
@ -73,7 +74,7 @@ client.update()
|
|||||||
client.stop()
|
client.stop()
|
||||||
|
|
||||||
// scrape
|
// scrape
|
||||||
client.scape()
|
client.scrape()
|
||||||
|
|
||||||
client.on('scrape', function (data) {
|
client.on('scrape', function (data) {
|
||||||
console.log('got a scrape response from tracker: ' + data.announce)
|
console.log('got a scrape response from tracker: ' + data.announce)
|
||||||
|
Loading…
Reference in New Issue
Block a user