Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bittorrent-protocol

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bittorrent-protocol - npm Package Compare versions

Comparing version 1.5.4 to 1.5.5

28

index.js

@@ -13,11 +13,11 @@ module.exports = Wire

var MESSAGE_PROTOCOL = new Buffer('\u0013BitTorrent protocol')
var MESSAGE_KEEP_ALIVE = new Buffer([0x00,0x00,0x00,0x00])
var MESSAGE_CHOKE = new Buffer([0x00,0x00,0x00,0x01,0x00])
var MESSAGE_UNCHOKE = new Buffer([0x00,0x00,0x00,0x01,0x01])
var MESSAGE_INTERESTED = new Buffer([0x00,0x00,0x00,0x01,0x02])
var MESSAGE_UNINTERESTED = new Buffer([0x00,0x00,0x00,0x01,0x03])
var MESSAGE_PROTOCOL = new Buffer('\u0013BitTorrent protocol')
var MESSAGE_KEEP_ALIVE = new Buffer([0x00, 0x00, 0x00, 0x00])
var MESSAGE_CHOKE = new Buffer([0x00, 0x00, 0x00, 0x01, 0x00])
var MESSAGE_UNCHOKE = new Buffer([0x00, 0x00, 0x00, 0x01, 0x01])
var MESSAGE_INTERESTED = new Buffer([0x00, 0x00, 0x00, 0x01, 0x02])
var MESSAGE_UNINTERESTED = new Buffer([0x00, 0x00, 0x00, 0x01, 0x03])
var MESSAGE_RESERVED = [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
var MESSAGE_PORT = [0x00,0x00,0x00,0x03,0x09,0x00,0x00]
var MESSAGE_RESERVED = [0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]
var MESSAGE_PORT = [0x00, 0x00, 0x00, 0x03, 0x09, 0x00, 0x00]

@@ -501,7 +501,2 @@ function Request (piece, offset, length, callback) {

//
// HELPER METHODS
//
Wire.prototype._callback = function (request, err, buffer) {

@@ -591,4 +586,5 @@ if (!request)

return this._onExtended(buffer.readUInt8(1), buffer.slice(2))
default:
return this.emit('unknownmessage', buffer)
}
this.emit('unknownmessage', buffer)
}

@@ -645,6 +641,6 @@

try {
return bencode.decode(buf);
return bencode.decode(buf)
} catch (e) {
console.warn(e);
console.warn(e)
}
}
{
"name": "bittorrent-protocol",
"description": "Simple, robust, BitTorrent peer wire protocol implementation",
"version": "1.5.4",
"version": "1.5.5",
"author": {

@@ -14,3 +14,3 @@ "name": "Feross Aboukhadijeh",

"dependencies": {
"bencode": "^0.6.0",
"bencode": "^0.7.0",
"bitfield": "^1.0.1",

@@ -23,4 +23,5 @@ "debug": "^2.0.0",

"devDependencies": {
"standard": "^2.3.1",
"tape": "^3.0.3",
"zuul": "^1.16.3"
"zuul": "^2.0.0"
},

@@ -45,3 +46,3 @@ "homepage": "http://webtorrent.io",

"scripts": {
"test": "npm run test-node && npm run test-browser",
"test": "standard && npm run test-node && npm run test-browser",
"test-browser": "zuul -- test/*.js",

@@ -48,0 +49,0 @@ "test-browser-local": "zuul --local -- test/*.js",

@@ -44,2 +44,1 @@ var Protocol = require('../')

})

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc