insite-ws

JSON →
library 2.4.0 ·javascript
verified Jun 7, 2026

WebSocket abstraction for server and client with built-in heartbeat, request/response RPC protocol, and connection quality tracking. Part of the inSite stack, designed for seamless integration with insite-ws-transfers, insite-users-server-ws, and other inSite packages. Current stable version is 2.4.0. Release cadence is not actively maintained. The package provides three entry points: insite-ws/server for Node.js, insite-ws/client for browser/Bun, and insite-ws/client/node for Node.js with ws polyfill. Key differentiators: message format uses JSON arrays, built-in request/response RPC with `~r-q`/`~r-s` kinds, heartbeat at 5-second intervals, and auto-reconnect on client side. The server supports SSL, custom client classes, and event-based message handling. Requires Node.js >=20.0.0.