fixparser-plugin-messagestore-kdb 9.4.7 → 9.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -797,6 +797,10 @@ var require_receiver = __commonJS({
|
|
|
797
797
|
* extensions
|
|
798
798
|
* @param {Boolean} [options.isServer=false] Specifies whether to operate in
|
|
799
799
|
* client or server mode
|
|
800
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
801
|
+
* buffered data chunks
|
|
802
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
803
|
+
* fragments
|
|
800
804
|
* @param {Number} [options.maxPayload=0] The maximum allowed message length
|
|
801
805
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
802
806
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -807,6 +811,8 @@ var require_receiver = __commonJS({
|
|
|
807
811
|
this._binaryType = options.binaryType || BINARY_TYPES[0];
|
|
808
812
|
this._extensions = options.extensions || {};
|
|
809
813
|
this._isServer = !!options.isServer;
|
|
814
|
+
this._maxBufferedChunks = options.maxBufferedChunks | 0;
|
|
815
|
+
this._maxFragments = options.maxFragments | 0;
|
|
810
816
|
this._maxPayload = options.maxPayload | 0;
|
|
811
817
|
this._skipUTF8Validation = !!options.skipUTF8Validation;
|
|
812
818
|
this[kWebSocket] = void 0;
|
|
@@ -836,6 +842,18 @@ var require_receiver = __commonJS({
|
|
|
836
842
|
*/
|
|
837
843
|
_write(chunk, encoding, cb) {
|
|
838
844
|
if (this._opcode === 8 && this._state == GET_INFO) return cb();
|
|
845
|
+
if (this._maxBufferedChunks > 0 && this._buffers.length >= this._maxBufferedChunks) {
|
|
846
|
+
cb(
|
|
847
|
+
this.createError(
|
|
848
|
+
RangeError,
|
|
849
|
+
"Too many buffered chunks",
|
|
850
|
+
false,
|
|
851
|
+
1008,
|
|
852
|
+
"WS_ERR_TOO_MANY_BUFFERED_PARTS"
|
|
853
|
+
)
|
|
854
|
+
);
|
|
855
|
+
return;
|
|
856
|
+
}
|
|
839
857
|
this._bufferedBytes += chunk.length;
|
|
840
858
|
this._buffers.push(chunk);
|
|
841
859
|
this.startLoop(cb);
|
|
@@ -1165,6 +1183,17 @@ var require_receiver = __commonJS({
|
|
|
1165
1183
|
return;
|
|
1166
1184
|
}
|
|
1167
1185
|
if (data.length) {
|
|
1186
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
1187
|
+
const error = this.createError(
|
|
1188
|
+
RangeError,
|
|
1189
|
+
"Too many message fragments",
|
|
1190
|
+
false,
|
|
1191
|
+
1008,
|
|
1192
|
+
"WS_ERR_TOO_MANY_BUFFERED_PARTS"
|
|
1193
|
+
);
|
|
1194
|
+
cb(error);
|
|
1195
|
+
return;
|
|
1196
|
+
}
|
|
1168
1197
|
this._messageLength = this._totalPayloadLength;
|
|
1169
1198
|
this._fragments.push(data);
|
|
1170
1199
|
}
|
|
@@ -1194,6 +1223,17 @@ var require_receiver = __commonJS({
|
|
|
1194
1223
|
cb(error);
|
|
1195
1224
|
return;
|
|
1196
1225
|
}
|
|
1226
|
+
if (this._maxFragments > 0 && this._fragments.length >= this._maxFragments) {
|
|
1227
|
+
const error = this.createError(
|
|
1228
|
+
RangeError,
|
|
1229
|
+
"Too many message fragments",
|
|
1230
|
+
false,
|
|
1231
|
+
1008,
|
|
1232
|
+
"WS_ERR_TOO_MANY_BUFFERED_PARTS"
|
|
1233
|
+
);
|
|
1234
|
+
cb(error);
|
|
1235
|
+
return;
|
|
1236
|
+
}
|
|
1197
1237
|
this._fragments.push(buf);
|
|
1198
1238
|
}
|
|
1199
1239
|
this.dataMessage(cb);
|
|
@@ -2400,6 +2440,10 @@ var require_websocket = __commonJS({
|
|
|
2400
2440
|
* multiple times in the same tick
|
|
2401
2441
|
* @param {Function} [options.generateMask] The function used to generate the
|
|
2402
2442
|
* masking key
|
|
2443
|
+
* @param {Number} [options.maxBufferedChunks=0] The maximum number of
|
|
2444
|
+
* buffered data chunks
|
|
2445
|
+
* @param {Number} [options.maxFragments=0] The maximum number of message
|
|
2446
|
+
* fragments
|
|
2403
2447
|
* @param {Number} [options.maxPayload=0] The maximum allowed message size
|
|
2404
2448
|
* @param {Boolean} [options.skipUTF8Validation=false] Specifies whether or
|
|
2405
2449
|
* not to skip UTF-8 validation for text and close messages
|
|
@@ -2411,6 +2455,8 @@ var require_websocket = __commonJS({
|
|
|
2411
2455
|
binaryType: this.binaryType,
|
|
2412
2456
|
extensions: this._extensions,
|
|
2413
2457
|
isServer: this._isServer,
|
|
2458
|
+
maxBufferedChunks: options.maxBufferedChunks,
|
|
2459
|
+
maxFragments: options.maxFragments,
|
|
2414
2460
|
maxPayload: options.maxPayload,
|
|
2415
2461
|
skipUTF8Validation: options.skipUTF8Validation
|
|
2416
2462
|
});
|
|
@@ -2710,6 +2756,8 @@ var require_websocket = __commonJS({
|
|
|
2710
2756
|
autoPong: true,
|
|
2711
2757
|
closeTimeout: CLOSE_TIMEOUT,
|
|
2712
2758
|
protocolVersion: protocolVersions[1],
|
|
2759
|
+
maxBufferedChunks: 1024 * 1024,
|
|
2760
|
+
maxFragments: 128 * 1024,
|
|
2713
2761
|
maxPayload: 100 * 1024 * 1024,
|
|
2714
2762
|
skipUTF8Validation: false,
|
|
2715
2763
|
perMessageDeflate: true,
|
|
@@ -2952,6 +3000,8 @@ var require_websocket = __commonJS({
|
|
|
2952
3000
|
websocket.setSocket(socket, head, {
|
|
2953
3001
|
allowSynchronousEvents: opts.allowSynchronousEvents,
|
|
2954
3002
|
generateMask: opts.generateMask,
|
|
3003
|
+
maxBufferedChunks: opts.maxBufferedChunks,
|
|
3004
|
+
maxFragments: opts.maxFragments,
|
|
2955
3005
|
maxPayload: opts.maxPayload,
|
|
2956
3006
|
skipUTF8Validation: opts.skipUTF8Validation
|
|
2957
3007
|
});
|
|
@@ -3294,6 +3344,10 @@ var require_websocket_server = __commonJS({
|
|
|
3294
3344
|
* called
|
|
3295
3345
|
* @param {Function} [options.handleProtocols] A hook to handle protocols
|
|
3296
3346
|
* @param {String} [options.host] The hostname where to bind the server
|
|
3347
|
+
* @param {Number} [options.maxBufferedChunks=1048576] The maximum number of
|
|
3348
|
+
* buffered data chunks
|
|
3349
|
+
* @param {Number} [options.maxFragments=131072] The maximum number of message
|
|
3350
|
+
* fragments
|
|
3297
3351
|
* @param {Number} [options.maxPayload=104857600] The maximum allowed message
|
|
3298
3352
|
* size
|
|
3299
3353
|
* @param {Boolean} [options.noServer=false] Enable no server mode
|
|
@@ -3315,6 +3369,8 @@ var require_websocket_server = __commonJS({
|
|
|
3315
3369
|
options = {
|
|
3316
3370
|
allowSynchronousEvents: true,
|
|
3317
3371
|
autoPong: true,
|
|
3372
|
+
maxBufferedChunks: 1024 * 1024,
|
|
3373
|
+
maxFragments: 128 * 1024,
|
|
3318
3374
|
maxPayload: 100 * 1024 * 1024,
|
|
3319
3375
|
skipUTF8Validation: false,
|
|
3320
3376
|
perMessageDeflate: false,
|
|
@@ -3594,6 +3650,8 @@ var require_websocket_server = __commonJS({
|
|
|
3594
3650
|
socket.removeListener("error", socketOnError);
|
|
3595
3651
|
ws.setSocket(socket, head, {
|
|
3596
3652
|
allowSynchronousEvents: this.options.allowSynchronousEvents,
|
|
3653
|
+
maxBufferedChunks: this.options.maxBufferedChunks,
|
|
3654
|
+
maxFragments: this.options.maxFragments,
|
|
3597
3655
|
maxPayload: this.options.maxPayload,
|
|
3598
3656
|
skipUTF8Validation: this.options.skipUTF8Validation
|
|
3599
3657
|
});
|