diff options
author | Feross Aboukhadijeh <feross@feross.org> | 2017-03-17 02:20:43 +0300 |
---|---|---|
committer | Feross Aboukhadijeh <feross@feross.org> | 2017-03-17 02:20:43 +0300 |
commit | acf3580e44ac32abe46347357ab4a261005bb14b (patch) | |
tree | cb011e61296b2c83ee4c8e1c8fb2bb299594cffc /lib/torrent.js | |
parent | d2d8c860dd265cb9431ddbb3426f671538c6483d (diff) |
doc: torrent.createServer() takes a function argument
Diffstat (limited to 'lib/torrent.js')
-rw-r--r-- | lib/torrent.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/torrent.js b/lib/torrent.js index 9617b18..661c30c 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -1623,10 +1623,10 @@ Torrent.prototype.load = function (streams, cb) { }) } -Torrent.prototype.createServer = function (opts) { +Torrent.prototype.createServer = function (requestListener) { if (typeof Server !== 'function') throw new Error('node.js-only method') if (this.destroyed) throw new Error('torrent is destroyed') - var server = new Server(this, opts) + var server = new Server(this, requestListener) this._servers.push(server) return server } |