diff options
-rw-r--r-- | index.js | 5 | ||||
-rw-r--r-- | lib/torrent.js | 3 | ||||
-rw-r--r-- | package.json | 2 |
3 files changed, 6 insertions, 4 deletions
@@ -45,7 +45,9 @@ function WebTorrent (opts) { self.destroyed = false self.torrentPort = opts.torrentPort || 0 self.tracker = opts.tracker !== undefined ? opts.tracker : true - self.rtcConfig = opts.rtcConfig + + self._rtcConfig = opts.rtcConfig + self._wrtc = opts.wrtc self.torrents = [] @@ -72,7 +74,6 @@ function WebTorrent (opts) { : opts.nodeId self.nodeIdHex = self.nodeId.toString('hex') - // TODO: implement webtorrent-dht if (opts.dht !== false && typeof DHT === 'function' /* browser exclude */) { // use a single DHT instance for all torrents, so the routing table can be reused self.dht = new DHT(extend({ nodeId: self.nodeId }, opts.dht)) diff --git a/lib/torrent.js b/lib/torrent.js index 8a189a2..6e329f1 100644 --- a/lib/torrent.js +++ b/lib/torrent.js @@ -209,7 +209,8 @@ Torrent.prototype._onSwarmListening = function () { tracker: self.client.tracker, peerId: self.client.peerId, port: self.client.torrentPort, - rtcConfig: self.client.rtcConfig + rtcConfig: self.client._rtcConfig, + wrtc: self.client._wrtc }) self.discovery.setTorrent(self.infoHash) self.discovery.on('peer', self.addPeer.bind(self)) diff --git a/package.json b/package.json index 1e63dbd..20992fc 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "simple-sha1": "^2.0.0", "speedometer": "^0.1.2", "thunky": "^0.1.0", - "torrent-discovery": "^2.0.1", + "torrent-discovery": "^3.0.0", "ut_metadata": "^2.1.0", "ut_pex": "^1.0.1", "windows-no-runnable": "0.0.6", |