Comparing version 0.6.4 to 0.6.5
@@ -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); |
@@ -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 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
128760
2948