Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

websocket13

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

websocket13 - npm Package Compare versions

Comparing version 1.2.0-beta1 to 1.2.0-beta2

4

examples/echoclient.js

@@ -7,3 +7,3 @@ /**

var socket = new WS13.WebSocket('ws://127.0.0.1:8080', {
var socket = new WS13.WebSocket('ws://echo.websocket.org', {
"protocols": ["foo", "bar"] // supported subprotocols

@@ -70,3 +70,1 @@ });

});
socket.on('debug', console.log);

@@ -74,3 +74,3 @@ /**

socket.on('debug', (msg) => {
console.log(msg);
//console.log(msg);
});

@@ -77,0 +77,0 @@

@@ -177,3 +177,3 @@ var WS13 = require('./index.js');

if (++this._pingFailures >= this.options.pingFailures) {
this._closeError(new Error("Ping timeout"));
this._terminateError(WS13.StatusCode.PolicyViolation, "Ping timeout");
} else {

@@ -635,10 +635,6 @@ this._queuePing();

WebSocketBase.prototype._terminateError = function(code, message) {
var payload = new ByteBuffer(2 + message.length, ByteBuffer.BIG_ENDIAN);
payload.writeUint16(code);
payload.writeString(message || "");
this._sendControl(WS13.FrameType.Control.Close, payload.flip().toBuffer());
var err = new Error(message);
err.state = this.state;
err.code = code;
this.disconnect(code, message);
this.state = WS13.State.ClosingError;

@@ -645,0 +641,0 @@ this.emit('error', err);

{
"name": "websocket13",
"version": "1.2.0-beta1",
"version": "1.2.0-beta2",
"description": "Simple WebSocket protocol 13 client with no native or heavy dependencies",

@@ -5,0 +5,0 @@ "author": "Alexander Corn <mckay@doctormckay.com>",

Sorry, the diff of this file is not supported yet

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