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>2015-04-11 12:16:31 +0300
committerFeross Aboukhadijeh <feross@feross.org>2015-04-11 12:16:31 +0300
commit3e21b1bcac40ca3645d3b5c7253ffe8aae16cc3d (patch)
tree4a81f57c93967148fdc31edd1e87b3593216779e /index.js
parentf622ebaa59d317ed58800a23c898c3cb8346f421 (diff)
Add client.address() method
Diffstat (limited to 'index.js')
-rw-r--r--index.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/index.js b/index.js
index 04b5989..7c3dbcc 100644
--- a/index.js
+++ b/index.js
@@ -242,6 +242,11 @@ WebTorrent.prototype.remove = function (torrentId, cb) {
torrent.destroy(cb)
}
+WebTorrent.prototype.address = function () {
+ var self = this
+ return { address: '0.0.0.0', family: 'IPv4', port: self.torrentPort }
+}
+
/**
* Destroy the client, including all torrents and connections to peers.
* @param {function} cb