Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/webtorrent/webtorrent.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFeross Aboukhadijeh <feross@feross.org>2017-03-17 02:20:43 +0300
committerFeross Aboukhadijeh <feross@feross.org>2017-03-17 02:20:43 +0300
commitacf3580e44ac32abe46347357ab4a261005bb14b (patch)
treecb011e61296b2c83ee4c8e1c8fb2bb299594cffc /lib/torrent.js
parentd2d8c860dd265cb9431ddbb3426f671538c6483d (diff)
doc: torrent.createServer() takes a function argument
Diffstat (limited to 'lib/torrent.js')
-rw-r--r--lib/torrent.js4
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
}