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

@aurox/persistent-websocket-connection

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aurox/persistent-websocket-connection - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

1

dist/constants.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_PING_PONG_TOLERANCE_TIMEOUT = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_PING_PONG_INTERVAL = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_CONNECTION_CHECK_INTERVAL = exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_RECONNECT_TIMEOUT = void 0;
exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_RECONNECT_TIMEOUT = 2000;

@@ -4,0 +5,0 @@ exports.DEFAULT_PERSISTENT_WEBSOCKET_CONNECTION_CONNECTION_CHECK_INTERVAL = 500;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOptionsWithDefaults = void 0;
const constants_1 = require("./constants");

@@ -4,0 +5,0 @@ function defaultDoPing(send) {

4

dist/index.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = void 0;
const tslib_1 = require("tslib");
tslib_1.__exportStar(require("./constants"), exports);
tslib_1.__exportStar(require("./types"), exports);
var PersistentWebsocketConnection_1 = require("./PersistentWebsocketConnection");
exports.default = PersistentWebsocketConnection_1.default;
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(PersistentWebsocketConnection_1).default; } });

@@ -96,4 +96,11 @@ "use strict";

this.handleNoPong = () => {
const tolerance = this.pingPongOptions.toleranceTimeout / 1000;
this.logger.error(`Connection to ${this.url} ping was not answered by a pong for ${tolerance} second(s), it will be reset.`);
if (this.pingPongOptions.heartbeatOnly) {
const debounce = this.pingPongOptions.heartbeatDebounce ? this.pingPongOptions.heartbeatDebounce : 0;
const tolerance = Number(((this.pingPongOptions.toleranceTimeout + debounce) / 1000).toFixed(3));
this.logger.error(`Connection to ${this.url}: Heartbeat was not received for ${tolerance} second(s), it will be reset.`);
}
else {
const tolerance = Number((this.pingPongOptions.toleranceTimeout / 1000).toFixed(3));
this.logger.error(`Connection to ${this.url}: Ping was not answered by a pong for ${tolerance} second(s), it will be reset.`);
}
clearTimeout(this.pingPongTimer);

@@ -100,0 +107,0 @@ this.closedDuoToPongOrHeartbeatTimeout = true;

{
"name": "@aurox/persistent-websocket-connection",
"version": "0.2.1",
"version": "0.2.2",
"description": "Aurox Persistent Websocket Connection",

@@ -19,16 +19,16 @@ "main": "dist/index.js",

"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.27.0",
"@typescript-eslint/parser": "^2.27.0",
"eslint": "^6.8.0",
"@typescript-eslint/eslint-plugin": "^4.11.0",
"@typescript-eslint/parser": "^4.11.0",
"eslint": "^7.16.0",
"rimraf": "^3.0.2",
"ts-node": "^8.8.2",
"typescript": "^3.8.3"
"ts-node": "^9.1.1",
"typescript": "^4.1.3"
},
"dependencies": {
"@types/node": "^13.11.1",
"@types/ws": "^7.2.3",
"@types/node": "^14.14.16",
"@types/ws": "^7.4.0",
"isomorphic-ws": "^4.0.1",
"tslib": "^1.11.1",
"ws": "^7.2.3"
"tslib": "^2.0.3",
"ws": "^7.4.1"
}
}
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