Socket
Socket
Sign inDemoInstall

engine.io-client

Package Overview
Dependencies
Maintainers
2
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

engine.io-client - npm Package Compare versions

Comparing version 2.0.2 to 2.1.0

7

History.md
2.1.0 / 2017-03-11
===================
* [chore] Bump engine.io-parser to version 2.0.1 (#549)
* [chore] Bump concat-stream to version 1.5.2 (#548)
* [feat] Allow to set the protocols for the websocket transport (#546)
2.0.2 / 2017-02-16

@@ -3,0 +10,0 @@ ===================

3

lib/socket.js

@@ -199,3 +199,4 @@ /**

localAddress: options.localAddress || this.localAddress,
requestTimeout: options.requestTimeout || this.requestTimeout
requestTimeout: options.requestTimeout || this.requestTimeout,
protocols: options.protocols || void (0)
});

@@ -202,0 +203,0 @@

@@ -50,2 +50,3 @@ /**

this.usingBrowserWebSocket = BrowserWebSocket && !opts.forceNode;
this.protocols = opts.protocols;
if (!this.usingBrowserWebSocket) {

@@ -90,3 +91,3 @@ WebSocket = NodeWebSocket;

var uri = this.uri();
var protocols = void (0);
var protocols = this.protocols;
var opts = {

@@ -113,3 +114,3 @@ agent: this.agent,

try {
this.ws = this.usingBrowserWebSocket ? new WebSocket(uri) : new WebSocket(uri, protocols, opts);
this.ws = this.usingBrowserWebSocket ? (protocols ? new WebSocket(uri, protocols) : new WebSocket(uri)) : new WebSocket(uri, protocols, opts);
} catch (err) {

@@ -116,0 +117,0 @@ return this.emit('error', err);

@@ -5,3 +5,3 @@ {

"license": "MIT",
"version": "2.0.2",
"version": "2.1.0",
"homepage": "https://github.com/socketio/engine.io-client",

@@ -30,3 +30,3 @@ "contributors": [

"debug": "2.3.3",
"engine.io-parser": "2.0.0",
"engine.io-parser": "2.0.1",
"has-cors": "1.1.0",

@@ -47,6 +47,6 @@ "indexof": "0.0.1",

"blob": "0.0.4",
"concat-stream": "1.4.6",
"concat-stream": "1.5.2",
"del": "2.2.0",
"derequire": "1.2.0",
"engine.io": "2.0.2",
"engine.io": "2.1.0",
"eslint-config-standard": "4.4.0",

@@ -53,0 +53,0 @@ "eslint-plugin-standard": "1.3.1",

@@ -228,5 +228,8 @@

- `onlyBinaryUpgrades` (`Boolean`): whether transport upgrades should be restricted to transports supporting binary data (`false`)
- `requestTimeout` (`Number`): Timeout for xhr-polling requests in milliseconds (`0`)
- `forceNode` (`Boolean`): Uses NodeJS implementation for websockets - even if there is a native Browser-Websocket available, which is preferred by default over the NodeJS implementation. (This is useful when using hybrid platforms like nw.js or electron) (`false`, NodeJS only)
- `localAddress` (`String`): the local IP address to connect to
- **Polling-only options**
- `requestTimeout` (`Number`): Timeout for xhr-polling requests in milliseconds (`0`)
- **Websocket-only options**
- `protocols` (`Array`): a list of subprotocols (see [MDN reference](https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API/Writing_WebSocket_servers#Subprotocols))
- `send`

@@ -233,0 +236,0 @@ - Sends a message to the server

Sorry, the diff of this file is too big to display

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