New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

eiows

Package Overview
Dependencies
Maintainers
0
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eiows - npm Package Compare versions

Comparing version

to
8.0.0

16

dist/eiows.js

@@ -77,14 +77,11 @@ /* jshint esversion: 6 */

send(message, options, cb) {
send(message, options, cb) { // options will be ignored
if (this.external) {
const binary = (typeof message !== 'string');
if (typeof options === 'function') {
cb = options;
options = null;
}
const binary = options && typeof options.binary === 'boolean' ? options.binary : typeof message !== 'string';
native.server.send(this.external, message, binary ? eiows.OPCODE_BINARY : eiows.OPCODE_TEXT, cb ? (() => {
process.nextTick(cb);
}) : undefined, options && options.compress);
}) : undefined);
} else if (cb) {

@@ -110,5 +107,8 @@ cb(new Error('not opened'));

var nativeOptions = 0;
var compressThreshold = 0;
if (options.perMessageDeflate !== undefined && options.perMessageDeflate !== false) {
nativeOptions |= eiows.PERMESSAGE_DEFLATE;
if (!isNaN(options.perMessageDeflate.threshold)) {
compressThreshold = Math.max(compressThreshold, options.perMessageDeflate.threshold);
}
if (options.perMessageDeflate.serverNoContextTakeover === false) {

@@ -119,3 +119,3 @@ nativeOptions |= eiows.SLIDING_DEFLATE_WINDOW;

this.serverGroup = native.server.group.create(nativeOptions, options.maxPayload === undefined ? DEFAULT_PAYLOAD_LIMIT : options.maxPayload);
this.serverGroup = native.server.group.create(nativeOptions, compressThreshold, options.maxPayload === undefined ? DEFAULT_PAYLOAD_LIMIT : options.maxPayload);

@@ -122,0 +122,0 @@ this._upgradeCallback = noop;

{
"name": "eiows",
"version": "7.1.2",
"version": "8.0.0",
"description": "custom fork of uWebSockets 0.14",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet