Comparing version 0.2.0 to 0.3.0
@@ -21,4 +21,4 @@ | ||
for (var i = 0; i < argv; i++) { | ||
var len = buf.readUInt16BE(off); | ||
off += 2; | ||
var len = buf.readUInt32BE(off); | ||
off += 4; | ||
@@ -25,0 +25,0 @@ var arg = buf.slice(off, off += len); |
@@ -23,3 +23,3 @@ | ||
for (var i = 0; i < argv; i++) { | ||
len += 2 + args[i].length; | ||
len += 4 + args[i].length; | ||
} | ||
@@ -37,4 +37,4 @@ | ||
buf.writeUInt16BE(arg.length, off); | ||
off += 2; | ||
buf.writeUInt32BE(arg.length, off); | ||
off += 4; | ||
@@ -41,0 +41,0 @@ arg.copy(buf, off); |
@@ -25,3 +25,3 @@ | ||
this.state = 'message'; | ||
this._lenbuf = new Buffer(2); | ||
this._lenbuf = new Buffer(4); | ||
} | ||
@@ -56,7 +56,9 @@ | ||
// done | ||
if (2 == this._leni) { | ||
this._arglen = this._lenbuf.readUInt16BE(); | ||
var buf = new Buffer(2); | ||
if (4 == this._leni) { | ||
this._arglen = this._lenbuf.readUInt32BE(); | ||
var buf = new Buffer(4); | ||
buf[0] = this._lenbuf[0]; | ||
buf[1] = this._lenbuf[1]; | ||
buf[2] = this._lenbuf[2]; | ||
buf[3] = this._lenbuf[3]; | ||
this._bufs.push(buf); | ||
@@ -63,0 +65,0 @@ this._argcur = 0; |
{ | ||
"name": "amp", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"repository": "visionmedia/node-amp", | ||
@@ -5,0 +5,0 @@ "description": "Abstract messaging protocol", |
@@ -30,4 +30,3 @@ | ||
are stored in the first byte, followed by a sequence of zero or more | ||
`<length>` / `<data>` pairs, where `length` is a 16-bit unsigned int, meaning | ||
each argument may be a _maximum_ of __65536__ bytes. | ||
`<length>` / `<data>` pairs, where `length` is a 32-bit unsigned integer. | ||
@@ -34,0 +33,0 @@ ``` |
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
4840
140
41