Socket
Socket
Sign inDemoInstall

websocket-extensions

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket-extensions - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

LICENSE.md

11

CHANGELOG.md

@@ -0,5 +1,14 @@

### 0.1.2 / 2017-09-10
* Catch synchronous exceptions thrown when calling an extension
* Fix race condition caused when a message is pushed after a cell has stopped
due to an error
* Fix failure of `close()` to return if a message that's queued after one that
produces an error never finishes being processed
### 0.1.1 / 2015-02-19
* Prevent sessions being closed before they have finished processing messages
* Add a callback to `Extensions.close()` so the caller can tell when it's safe to close the socket
* Add a callback to `Extensions.close()` so the caller can tell when it's safe
to close the socket

@@ -6,0 +15,0 @@ ### 0.1.0 / 2014-12-12

3

lib/pipeline/cell.js

@@ -17,3 +17,4 @@ 'use strict';

Cell.prototype.pending = function(direction) {
this._functors[direction].pending += 1;
var functor = this._functors[direction];
if (!functor._stopped) functor.pending += 1;
};

@@ -20,0 +21,0 @@

@@ -30,3 +30,3 @@ 'use strict';

this._session[this._method](message, function(err, msg) {
var handler = function(err, msg) {
if (!(called ^ (called = true))) return;

@@ -44,3 +44,9 @@

self._flushQueue();
});
};
try {
this._session[this._method](message, handler);
} catch (err) {
handler(err);
}
};

@@ -57,4 +63,9 @@

while (queue.length > 0 && queue.peek().done) {
this.pending -= 1;
record = queue.shift();
if (record.error) {
this.pending = 0;
queue.clear();
} else {
this.pending -= 1;
}
record.callback.call(record.context, record.error, record.message);

@@ -61,0 +72,0 @@ }

@@ -231,3 +231,3 @@ # Extension pipelining

## Solution
## Solution

@@ -596,3 +596,3 @@ We now describe the model implemented here and how it meets the above design

## Alternative ideas
## Alternative ideas

@@ -599,0 +599,0 @@ I am considering implementing `Functor` as an object-mode transform stream

'use strict';
var RingBuffer = function(bufferSize) {
this._buffer = new Array(bufferSize);
this._bufferSize = bufferSize;
this.clear();
};
RingBuffer.prototype.clear = function() {
this._buffer = new Array(this._bufferSize);
this._ringOffset = 0;
this._ringSize = bufferSize;
this._ringSize = this._bufferSize;
this._head = 0;

@@ -9,0 +13,0 @@ this._tail = 0;

@@ -12,3 +12,3 @@ 'use strict';

this._sessions = [];
this._index = {}
this._index = {};
};

@@ -93,5 +93,5 @@

generateResponse: function(header) {
var offers = Parser.parseHeader(header),
sessions = [],
response = [];
var sessions = [],
response = [],
offers = Parser.parseHeader(header);

@@ -98,0 +98,0 @@ this._inOrder.forEach(function(ext) {

@@ -8,9 +8,11 @@ { "name" : "websocket-extensions"

, "version" : "0.1.1"
, "engines" : {"node": ">=0.6.0"}
, "version" : "0.1.2"
, "engines" : { "node": ">=0.8.0" }
, "files" : ["lib"]
, "main" : "./lib/websocket_extensions"
, "devDependencies" : {"jstest": ""}
, "scripts" : {"test": "jstest spec/runner.js"}
, "devDependencies" : { "jstest": "*" }
, "scripts" : { "test": "jstest spec/runner.js" }
, "repository" : { "type" : "git"

@@ -17,0 +19,0 @@ , "url" : "git://github.com/faye/websocket-extensions-node.git"

@@ -332,24 +332,1 @@ # websocket-extensions [![Build status](https://secure.travis-ci.org/faye/websocket-extensions-node.svg)](http://travis-ci.org/faye/websocket-extensions-node)

* Provider: [permessage-deflate](https://github.com/faye/permessage-deflate-node)
## License
(The MIT License)
Copyright (c) 2014-2015 James Coglan
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the 'Software'), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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