Skip to content

Commit

Permalink
Merge pull request #166 from webtorrent/address
Browse files Browse the repository at this point in the history
support passing address to listen()
  • Loading branch information
feross committed Jun 23, 2017
2 parents b77ba52 + 4a39566 commit 685467f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ addons:
packages:
- g++-4.8
node_js:
- "node"
- "8"
- "6"
- "4"
- "0.12"
- "0.10"
Expand Down
6 changes: 3 additions & 3 deletions client.js
Original file line number Diff line number Diff line change
Expand Up @@ -352,9 +352,9 @@ DHT.prototype.address = function () {
return this._rpc.address()
}

DHT.prototype.listen = function (port, cb) {
if (typeof port === 'function') return this.listen(0, port)
this._rpc.bind(port, cb)
// listen([port], [address], [onlistening])
DHT.prototype.listen = function () {
this._rpc.bind.apply(this._rpc, arguments)
}

DHT.prototype.destroy = function (cb) {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"debug": "^2.2.0",
"inherits": "^2.0.1",
"k-bucket": "^3.0.1",
"k-rpc": "^4.0.0",
"k-rpc": "^4.1.0",
"lru": "^3.1.0",
"safe-buffer": "^5.0.1"
},
Expand Down

0 comments on commit 685467f

Please sign in to comment.