Socket
Socket
Sign inDemoInstall

ws

Package Overview
Dependencies
Maintainers
2
Versions
169
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ws - npm Package Compare versions

Comparing version 0.6.4 to 0.6.5

10

lib/WebSocket.js

@@ -241,3 +241,6 @@ 'use strict';

if (typeof options.mask === 'undefined') options.mask = !this._isServer;
if (typeof options.compress === 'undefined') options.compress = !!this.extensions[PerMessageDeflate.extensionName];
if (typeof options.compress === 'undefined') options.compress = true;
if (!this.extensions[PerMessageDeflate.extensionName]) {
options.compress = false;
}

@@ -295,3 +298,6 @@ var readable = typeof stream.Readable === 'function'

if (typeof options.mask === 'undefined') options.mask = !this._isServer;
if (typeof options.compress === 'undefined') options.compress = !!this.extensions[PerMessageDeflate.extensionName];
if (typeof options.compress === 'undefined') options.compress = true;
if (!this.extensions[PerMessageDeflate.extensionName]) {
options.compress = false;
}

@@ -298,0 +304,0 @@ startQueue(this);

2

package.json

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

"description": "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455",
"version": "0.6.4",
"version": "0.6.5",
"license": "MIT",

@@ -8,0 +8,0 @@ "keywords": [

@@ -84,5 +84,5 @@ # ws: a node.js websocket library

wss.broadcast = function broadcast(data) {
for(var i in this.clients) {
this.clients[i].send(data);
}
wss.clients.forEach(function each(client) {
client.send(data);
});
};

@@ -101,3 +101,3 @@ ```

ws.send('something', function ack(error) {
// if error is null, the send has been completed,
// if error is not defined, the send has been completed,
// otherwise the error object will indicate what failed.

@@ -104,0 +104,0 @@ });

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