diff --git a/README.md b/README.md index b2605fe..155475e 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,8 @@ server.on('warning', function (err) { console.log(err.message) }) -server.on('listening', function () { - console.log('tracker server is listening!') +server.on('listening', function (port) { + console.log('tracker server is now listening on ' + port) }) // start tracker server listening! @@ -137,6 +137,8 @@ server.torrents[infoHash].incomplete server.torrents[infoHash].peers ``` +The http server will handle requests for the following paths: `/announce`, `/scrape`. Requests for other paths will not be handled. + ## license MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org). diff --git a/server.js b/server.js index 2a94f71..c90009b 100644 --- a/server.js +++ b/server.js @@ -12,7 +12,6 @@ var parallel = require('run-parallel') var querystring = require('querystring') var string2compact = require('string2compact') - var REMOVE_IPV6_RE = /^::ffff:/ inherits(Server, EventEmitter) @@ -78,7 +77,7 @@ Server.prototype.listen = function (port, onlistening) { parallel(tasks, function (err) { if (err) return self.emit('error', err) - self.emit('listening') + self.emit('listening', port) }) }