Socket
Socket
Sign inDemoInstall

ws

Package Overview
Dependencies
1
Maintainers
1
Versions
168
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.0 to 0.3.1

5

History.md

@@ -0,1 +1,6 @@

v0.3.1 - Dec 8th 2011
======================
* Service release, fixing broken tests.
v0.3.0 - Dec 8th 2011

@@ -2,0 +7,0 @@ ======================

2

lib/Sender.js

@@ -179,3 +179,3 @@ /*!

if (!data) return new Buffer(0);
if (data instanceof Buffer) return data;
if (data instanceof Buffer) return new Buffer(data);
return (data && typeof data.buffer !== 'undefined')

@@ -182,0 +182,0 @@ ? getArrayBuffer(data.buffer)

@@ -203,3 +203,4 @@ /*!

if (this._queue) {
this._queue.push(this.send.bind(this, data, options, cb));
var self = this;
this._queue.push(function() { self.send(data, options, cb); });
return;

@@ -242,3 +243,4 @@ }

if (this._queue) {
this._queue.push(this.stream.bind(this, options, cb));
var self = this;
this._queue.push(function() { self.stream(options, cb); });
return;

@@ -245,0 +247,0 @@ }

@@ -15,9 +15,2 @@ /*!

/**
* Constants
*/
var protocolPrefix = "HyBi-";
var protocolVersion = 13;
/**
* WebSocket implementation

@@ -24,0 +17,0 @@ */

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

"description": "simple and very fast websocket protocol client for node.js",
"version": "0.3.0",
"version": "0.3.1",
"repository": {

@@ -25,5 +25,5 @@ "type": "git",

"devDependencies": {
"mocha": "0.0.x",
"mocha": "0.3.x",
"should": "0.3.2"
}
}

@@ -1,7 +0,9 @@

# ws: a node.js websocket.client #
# ws: a node.js websocket implementation #
`ws` is a simple to use, blazing fast, websocket client for node.js, up-to-date against current HyBi protocol versions.
`ws` is a simple to use, blazing fast, websocket implementation for node.js, up-to-date against current HyBi protocol versions.
Passes the quite extensible Autobahn test suite. See http://einaros.github.com/ws for the full report.
Passes the quite extensible Autobahn test suite. See http://einaros.github.com/ws for the full reports.
Also comes with a command line utility, 'wscat', which can either act as a server (--listen), or client (--conect). use it to debug simple websocket services.
## Usage ##

@@ -8,0 +10,0 @@

@@ -262,3 +262,3 @@ var assert = require('assert')

})
it('without data should fail', function(done) {
it('without data should be successful', function(done) {
server.createServer(++port, function(srv) {

@@ -270,3 +270,2 @@ var ws = new WebSocket('ws://localhost:' + port);

srv.on('message', function(message, flags) {
assert.equal(false, flags.masked);
assert.equal('', message);

@@ -298,3 +297,2 @@ srv.close();

srv.on('message', function(message, flags) {
assert.equal(false, flags.masked);
assert.equal('hi', message);

@@ -332,3 +330,2 @@ srv.close();

assert.ok(flags.binary);
assert.equal(false, flags.masked);
assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message))));

@@ -335,0 +332,0 @@ srv.close();

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc