Comparing version 0.18.1 to 0.19.0
@@ -27,2 +27,3 @@ /* | ||
function TBufferedTransport(buffer, callback) { | ||
THeaderTransport.call(this); | ||
this.defaultReadBufferSize = 1024; | ||
@@ -38,3 +39,3 @@ this.writeBufferSize = 512; // Soft Limit | ||
TBufferedTransport.prototype = new THeaderTransport(); | ||
Object.setPrototypeOf(TBufferedTransport.prototype, THeaderTransport.prototype); | ||
@@ -41,0 +42,0 @@ TBufferedTransport.prototype.reset = function() { |
@@ -27,2 +27,3 @@ /* | ||
function TFramedTransport(buffer, callback) { | ||
THeaderTransport.call(this); | ||
this.inBuf = buffer || new Buffer(0); | ||
@@ -35,7 +36,7 @@ this.outBuffers = []; | ||
TFramedTransport.prototype = new THeaderTransport(); | ||
Object.setPrototypeOf(TFramedTransport.prototype, THeaderTransport.prototype); | ||
TFramedTransport.receiver = function(callback, seqid) { | ||
var residual = []; | ||
return function(data) { | ||
@@ -47,5 +48,5 @@ // push received data to residual | ||
while (residual.length > 0) { | ||
while (residual.length > 0) { | ||
if (residual.length < 4) { | ||
// Not enough bytes to continue, save and resume on next packet | ||
// Not enough bytes to continue, save and resume on next packet | ||
return; | ||
@@ -63,3 +64,3 @@ } | ||
// get package data | ||
var frame = Buffer.from(residual.splice(0, frameSize)); | ||
var frame = Buffer.from(residual.splice(0, frameSize)); | ||
callback(new TFramedTransport(frame), seqid); | ||
@@ -66,0 +67,0 @@ } |
@@ -9,3 +9,3 @@ { | ||
}, | ||
"version": "0.18.1", | ||
"version": "0.19.0", | ||
"author": { | ||
@@ -56,4 +56,4 @@ "name": "Apache Thrift Developers", | ||
"eslint-plugin-prettier": "^3.0.0", | ||
"html-validator-cli": "^4.1.4", | ||
"jsdoc": "^3.6.7", | ||
"html-validator-cli": "^2.0.0", | ||
"jsdoc": "^4.0.2", | ||
"json-int64": "^1.0.2", | ||
@@ -60,0 +60,0 @@ "nyc": "^15.0.0", |
233472
5879