Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for NAT traversal techniques #1437

Open
wants to merge 20 commits into
base: master
from
Open
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

Prev

standard fixes

  • Loading branch information
oleiba committed Sep 6, 2018
commit f2b8bfd2584f2b1dd7c1c08cabc2f657d5b9fe2d
@@ -95,15 +95,15 @@ class WebTorrent extends EventEmitter {
}
}

this._natTraversal = require('./lib/nat-traversal') // browser exclude
this._natTraversal = require('./lib/nat-traversal') // browser exclude

if (typeof TCPPool === 'function') {
this._tcpPool = new TCPPool(this)
} else {
process.nextTick(function () {
this._onListening()
})
}
if (typeof TCPPool === 'function') {
this._tcpPool = new TCPPool(this)
} else {
process.nextTick(function () {
this._onListening()
})
}

// stats
this._downloadSpeed = speedometer()
@@ -391,7 +391,7 @@ class WebTorrent extends EventEmitter {
}

parallel(tasks, cb)

if (err) this.emit('error', err)

this.torrents = []
@@ -87,7 +87,7 @@ NatTraversal.prototype.portMapping = function (port, protocol, cb) {
protocol = 'tcp'
}

self._openedPorts.push({port: port, protocol: protocol})
self._openedPorts.push({ port: port, protocol: protocol })

// Try UPnP first
self._upnpPortMapping(port, protocol, function (err) {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.