A WebSocket transport for kalm.js, which is a real-time messaging framework for Node.js and the browser. Current version 3.3.0 supports Node >=6.0 and browser environments. It provides a seamless integration with kalm's pub/sub model, handling WebSocket connections under the hood. Compared to raw WebSocket or Socket.IO, it simplifies transport layer configuration and allows easy switching between transports. Release cadence is low, with occasional updates to align with kalm.js changes.
npm install kalm-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to create a WebSocket server and client using kalm and kalm-websocket, including subscribing and writing to a channel.
Use 'transport' in Kalm.listen() on server and 'adapter' in Kalm.connect() on client.
Use default import: const ws = require('kalm-websocket') or import ws from 'kalm-websocket'. Do not instantiate it.Upgrade Node.js to version 6.0 or later.
Use a bundler like webpack with appropriate alias or conditional require to avoid double inclusion.
Use: const ws = require('kalm-websocket'); Kalm.listen({ transport: ws });Run: npm install kalm kalm-websocket
Ensure your environment supports WebSocket or install 'ws' as a dependency.