
Security News
NIST Under Federal Audit for NVD Processing Backlog and Delays
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
@sergtyapkin/reconnecting-websocket
Advanced tools
 
WebSocket that will try to reconnects to server when lost connection.
First reconnection attempt after reconnectTimeout
milliseconds.
With each subsequent reconnection, the timeout will increase by x2
but max reconnection timeout is maxReconnectTimeout
.
Default values:
reconnectTimeout = 1000
maxReconnectTimeout = 4000
Example without Vue framework:
import WS from "@sergtyapkin/reconnecting-websocket";
WS.handlers.some_event = (jsonData) => {console.log(jsonData)};
// WS.onopen = (event) => {};
// WS.onerror = (event) => {};
// WS.onclose = (event) => {};
// to disable some handler
delete WS.handlers.some_event;
Example entrypoint using Vue.js:
// index.js
import { createApp } from 'vue';
import App from './App.vue';
import WS from "@sergtyapkin/reconnecting-websocket";
const app = createApp(App)
.use(WS, `wss://${location.host}/ws`)
.mount('#app');
// Now WS class available in any child component by:
// this.$ws
FAQs
 
The npm package @sergtyapkin/reconnecting-websocket receives a total of 43 weekly downloads. As such, @sergtyapkin/reconnecting-websocket popularity was classified as not popular.
We found that @sergtyapkin/reconnecting-websocket demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.
Security News
TypeScript Native Previews offers a 10x faster Go-based compiler, now available on npm for public testing with early editor and language support.