bittorrent-protocol
Advanced tools
Comparing version 0.6.1 to 0.7.0
13
index.js
@@ -228,8 +228,7 @@ module.exports = Wire | ||
* Message: "extended" <len=0005+X><id=20><ext-number><payload> | ||
* @param {number} extNumber | ||
* @param {number} ext | ||
* @param {Object} obj | ||
*/ | ||
Wire.prototype.extended = function (extNumber, obj) { | ||
var ext_id = new Buffer(1) | ||
ext_id.writeUInt8(extNumber, 0) | ||
Wire.prototype.extended = function (ext, obj) { | ||
var ext_id = new Buffer([ext]) | ||
this._message(20, [], Buffer.concat([ext_id, bncode.encode(obj)])) | ||
@@ -317,4 +316,4 @@ } | ||
Wire.prototype._onextended = function (ext) { | ||
this.emit('extended', ext) | ||
Wire.prototype._onextended = function (ext, buf) { | ||
this.emit('extended', ext, buf) | ||
} | ||
@@ -459,3 +458,3 @@ | ||
case 20: | ||
return this._onextended(bncode.decode(buffer)) | ||
return this._onextended(buffer.readUInt8(1), buffer.slice(2)) | ||
} | ||
@@ -462,0 +461,0 @@ this.emit('unknownmessage', buffer) |
{ | ||
"name": "bittorrent-protocol", | ||
"version": "0.6.1", | ||
"description": "Simple, robust, BitTorrent peer wire protocol implementation", | ||
"main": "index.js", | ||
"version": "0.7.0", | ||
"author": { | ||
"name": "Feross Aboukhadijeh", | ||
"email": "feross@feross.org", | ||
"url": "http://feross.org/" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/feross/bittorrent-protocol/issues" | ||
}, | ||
"dependencies": { | ||
@@ -14,2 +21,19 @@ "bitfield": "~0.1.0", | ||
}, | ||
"homepage": "http://webtorrent.io", | ||
"keywords": [ | ||
"torrent", | ||
"bittorrent", | ||
"protocol", | ||
"stream", | ||
"peer", | ||
"wire", | ||
"p2p", | ||
"peer-to-peer" | ||
], | ||
"license": "MIT", | ||
"main": "index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/feross/bittorrent-protocol.git" | ||
}, | ||
"scripts": { | ||
@@ -27,26 +51,3 @@ "test": "tape test/*.js" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git://github.com/feross/bittorrent-protocol.git" | ||
}, | ||
"keywords": [ | ||
"torrent", | ||
"bittorrent", | ||
"protocol", | ||
"stream", | ||
"peer", | ||
"wire", | ||
"p2p", | ||
"peer-to-peer" | ||
], | ||
"author": { | ||
"name": "Feross Aboukhadijeh", | ||
"email": "feross@feross.org", | ||
"url": "http://feross.org/" | ||
}, | ||
"license": "MIT", | ||
"bugs": { | ||
"url": "https://github.com/feross/bittorrent-protocol/issues" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
25125
1
592