Presidium WebSocket is a client and server library for Node.js implementing RFC 6455 (WebSocket) and RFC 7692 (Compression Extensions). Current stable version is 4.1.0. It features built-in per-message deflate compression, support for secure WebSocket (WSS) via WebSocket.SecureServer, and automatic reconnection via the connect() method. Compared to alternatives like 'ws', it offers a simpler API combining client and server in one package, and is part of the larger Presidium ecosystem. Release cadence is irregular; generally active but with infrequent updates.
npm install presidium-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket server and client, sends messages between them, and logs received messages.
Use require instead: const WebSocket = require('presidium-websocket');Use WebSocket.Server or destructure { Server } from the module.Use WebSocket.SecureServer or destructure { SecureServer } from the module.Pass a callback to the WebSocket.Server constructor or use the 'connection' event on the returned server instance (check documentation).
const WebSocket = require('presidium-websocket'); const server = new WebSocket.Server(...)Run: npm install presidium-websocket
Use a different port or kill the process using the port.
Ensure the WebSocket is open before sending: check readyState === 1.
No dependency data recorded yet.