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

engine.io

Package Overview
Dependencies
Maintainers
2
Versions
152
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io - npm Package Compare versions

Comparing version 3.1.5 to 3.2.0

18

lib/server.js

@@ -39,4 +39,4 @@

this.wsEngine = opts.wsEngine || process.env.EIO_WS_ENGINE || 'uws';
this.pingTimeout = opts.pingTimeout || 60000;
this.wsEngine = opts.wsEngine || process.env.EIO_WS_ENGINE || 'ws';
this.pingTimeout = opts.pingTimeout || 5000;
this.pingInterval = opts.pingInterval || 25000;

@@ -107,12 +107,6 @@ this.upgradeTimeout = opts.upgradeTimeout || 10000;

var wsModule;
try {
switch (this.wsEngine) {
case 'uws': wsModule = require('uws'); break;
case 'ws': wsModule = require('ws'); break;
default: throw new Error('unknown wsEngine');
}
} catch (ex) {
this.wsEngine = 'ws';
// keep require('ws') as separate expression for packers (browserify, etc)
wsModule = require('ws');
switch (this.wsEngine) {
case 'uws': wsModule = require('uws'); break;
case 'ws': wsModule = require('ws'); break;
default: throw new Error('unknown wsEngine');
}

@@ -119,0 +113,0 @@ this.ws = new wsModule.Server({

@@ -139,3 +139,3 @@

var chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
var chunks = isBinary ? Buffer.concat([]) : '';
var self = this;

@@ -166,3 +166,3 @@

if (contentLength > self.maxHttpBufferSize) {
chunks = isBinary ? new Buffer(0) : ''; // eslint-disable-line node/no-deprecated-api
chunks = isBinary ? Buffer.concat([]) : '';
req.connection.destroy();

@@ -169,0 +169,0 @@ }

{
"name": "engine.io",
"version": "3.1.5",
"version": "3.2.0",
"description": "The realtime engine behind Socket.IO. Provides the foundation of a bidirectional connection between client and server",

@@ -38,3 +38,3 @@ "main": "lib/engine.io",

"babel-preset-es2015": "^6.24.0",
"engine.io-client": "3.1.5",
"engine.io-client": "3.2.0",
"eslint": "^4.5.0",

@@ -49,5 +49,3 @@ "eslint-config-standard": "^10.2.1",

"s": "0.1.1",
"superagent": "^3.8.1"
},
"optionalDependencies": {
"superagent": "^3.8.1",
"uws": "~9.14.0"

@@ -57,3 +55,3 @@ },

"lint": "eslint lib/ test/ *.js",
"test": "npm run lint && mocha && EIO_WS_ENGINE=ws mocha"
"test": "npm run lint && mocha && EIO_WS_ENGINE=uws mocha"
},

@@ -60,0 +58,0 @@ "repository": {

@@ -199,3 +199,3 @@

- `pingTimeout` (`Number`): how many ms without a pong packet to
consider the connection closed (`60000`)
consider the connection closed (`5000`)
- `pingInterval` (`Number`): how many ms before sending a new ping

@@ -230,3 +230,3 @@ packet (`25000`)

- `cookieHttpOnly` (`Boolean`): If `true` HttpOnly io cookie cannot be accessed by client-side APIs, such as JavaScript. (`true`) _This option has no effect if `cookie` or `cookiePath` is set to `false`._
- `wsEngine` (`String`): what WebSocket server implementation to use. Specified module must conform to the `ws` interface (see [ws module api docs](https://github.com/websockets/ws/blob/master/doc/ws.md)). Default value is `uws` (see [µWebSockets](https://github.com/uWebSockets/uWebSockets)).
- `wsEngine` (`String`): what WebSocket server implementation to use. Specified module must conform to the `ws` interface (see [ws module api docs](https://github.com/websockets/ws/blob/master/doc/ws.md)). Default value is `ws`. An alternative c++ addon is also available by installing `uws` module.
- `initialPacket` (`Object`): an optional packet which will be concatenated to the handshake packet emitted by Engine.IO.

@@ -233,0 +233,0 @@ - `close`

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