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

protodef

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protodef - npm Package Compare versions

Comparing version 1.6.4 to 1.6.5

4

doc/history.md
# History
## 1.6.5
* fix fullpacketparser error emission in case of partial packet
## 1.6.4

@@ -4,0 +8,0 @@

2

package.json
{
"name": "protodef",
"version": "1.6.4",
"version": "1.6.5",
"description": "A simple yet powerful way to define binary protocols",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -75,16 +75,14 @@ const Transform = require("readable-stream").Transform;

_transform(chunk, enc, cb) {
let packet;
try {
const packet = this.parsePacketBuffer(chunk);
packet = this.parsePacketBuffer(chunk);
if(packet.metadata.size!==chunk.length)
throw new Error("Chunk size is",chunk.length,"but only",packet.metadata.size,"was read ; partial packet :",
packet.data+"; buffer :",chunk.toString("hex"));
else {
this.push(packet);
cb();
}
console.log("Chunk size is "+chunk.length+" but only "+packet.metadata.size+" was read ; partial packet : "+
packet.data+"; buffer :"+chunk.toString("hex"));
}
catch(e) {
cb(e);
return cb(e);
}
this.push(packet);
cb();
}

@@ -91,0 +89,0 @@ }

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