bittorrent-dht
Advanced tools
Comparing version 7.3.4 to 7.4.0
@@ -403,2 +403,4 @@ module.exports = DHT | ||
this.emit('find_node', target) | ||
var nodes = this._rpc.nodes.closest(target) | ||
@@ -413,2 +415,4 @@ this._rpc.response(peer, query, {id: this._rpc.id}, nodes) | ||
this.emit('get_peers', infoHash) | ||
var r = {id: this._rpc.id, token: this._generateToken(host)} | ||
@@ -437,2 +441,4 @@ var peers = this._peers.get(infoHash.toString('hex')) | ||
this.emit('announce_peer', infoHash, {host: host, port: peer.port}) | ||
this._addPeer({host: host, port: port}, infoHash, {host: host, port: peer.port}) | ||
@@ -454,2 +460,4 @@ this._rpc.response(peer, query, {id: this._rpc.id}) | ||
this.emit('get', target, value) | ||
if (!value) { | ||
@@ -491,2 +499,4 @@ var nodes = this._rpc.nodes.closest(target) | ||
this.emit('put', key, v) | ||
if (isMutable) { | ||
@@ -493,0 +503,0 @@ if (!this._verify) return this._rpc.error(peer, query, [400, 'verification not supported']) |
{ | ||
"name": "bittorrent-dht", | ||
"description": "Simple, robust, BitTorrent DHT implementation", | ||
"version": "7.3.4", | ||
"version": "7.4.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Feross Aboukhadijeh", |
80819
2118