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.2.0 to 1.3.0

8

index.js

@@ -10,2 +10,4 @@ module.exports = Wire

var BITFIELD_GROW = 400000
var MESSAGE_PROTOCOL = new Buffer('\u0013BitTorrent protocol')

@@ -40,3 +42,7 @@ var MESSAGE_KEEP_ALIVE = new Buffer([0x00,0x00,0x00,0x00])

this.peerPieces = new BitField(0)
// The largest torrent that I know of (the Geocities archive) is ~641 GB and has
// ~41,000 pieces. Therefore, cap bitfield to 10x larger (400,000 bits) to support all
// possible torrents but prevent malicious peers from growing bitfield to fill memory.
this.peerPieces = new BitField(0, { grow: BITFIELD_GROW })
this.peerExtensions = {}

@@ -43,0 +49,0 @@

10

package.json
{
"name": "bittorrent-protocol",
"description": "Simple, robust, BitTorrent peer wire protocol implementation",
"version": "1.2.0",
"version": "1.3.0",
"author": {

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

"dependencies": {
"bitfield": "^0.2.0",
"bncode": "^0.5.0",
"bitfield": "^1.0.1",
"bncode": "^0.5.3",
"inherits": "^2.0.1",
"speedometer": "^0.1.2",
"extend.js": "0.0.1"
"extend.js": "^0.0.1"
},
"devDependencies": {
"tape": "2.x"
"tape": "^2.12.3"
},

@@ -24,0 +24,0 @@ "homepage": "http://webtorrent.io",

@@ -1,2 +0,2 @@

# bittorrent-protocol [![build](http://img.shields.io/travis/feross/bittorrent-protocol.svg)](https://travis-ci.org/feross/bittorrent-protocol) [![npm](http://img.shields.io/npm/v/bittorrent-protocol.svg)](https://npmjs.org/package/bittorrent-protocol) [![gittip](http://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/)
# bittorrent-protocol [![build](https://img.shields.io/travis/feross/bittorrent-protocol.svg)](https://travis-ci.org/feross/bittorrent-protocol) [![npm](https://img.shields.io/npm/v/bittorrent-protocol.svg)](https://npmjs.org/package/bittorrent-protocol) [![gittip](https://img.shields.io/gittip/feross.svg)](https://www.gittip.com/feross/)

@@ -3,0 +3,0 @@ ### Simple, robust, BitTorrent wire protocol implementation

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