Registry / communication / kevoree-chan-websocket

kevoree-chan-websocket

JSON →
library3.0.0-SNAPSHOTjsnpmunverified

Kevoree channel implementation using WebSocket protocol for real-time communication between Kevoree nodes. This is a snapshot package (version 3.0.0-SNAPSHOT) from the kevoree-js project, which is part of the Kevoree modeling platform. It provides a communication channel that leverages WebSockets, suitable for browser and Node.js environments. The package is still in development, so APIs may change without notice.

npm install kevoree-chan-websocket
INSTALL
IMPORT
SIG · KEVOREE-CHAN-WEBSO
K
kevoree-chan-websocket
communicationjavascriptv3.0.0-SNAPSHOT
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import KevoreeChanWebSocket from 'kevoree-chan-websocket'
const KevoreeChanWebSocket = require('kevoree-chan-websocket')
Package is ESM-only. CommonJS require() yields undefined in newer versions.
KevoreeChanWebSocket
import { KevoreeChanWebSocket } from 'kevoree-chan-websocket'
const { KevoreeChanWebSocket } = require('kevoree-chan-websocket')
Named export available for style consistency.
ChannelWebSocket
import { ChannelWebSocket } from 'kevoree-chan-websocket'
import { ChanWebSocket } from 'kevoree-chan-websocket'
Export name is ChannelWebSocket, not ChanWebSocket.

Instantiates and uses the default WebSocket channel to send and receive messages asynchronously.

import KevoreeChanWebSocket from 'kevoree-chan-websocket'; const channel = new KevoreeChanWebSocket(); // Configure and use the channel channel.on('message', (msg) => console.log(msg)); channel.send('Hello via WebSocket');
Debug
Known issues
gotchaPackage version 3.0.0-SNAPSHOT is a development snapshot - APIs may break without notice.
fix
Pin to a stable release if available, or expect frequent API changes.
affects: 3.0.0-SNAPSHOT
deprecatedThe previous version 2.x used CommonJS require; code using require() will not work with 3.x.
fix
Switch to ES6 import syntax.
affects: >=3.0.0
breakingThe default export changed from 'WebSocketChannel' in v2 to 'KevoreeChanWebSocket' in v3.
fix
Update import statements to use 'KevoreeChanWebSocket'.
affects: >=3.0.0
Errors
Common errors & fixes
Error: Cannot find module 'kevoree-chan-websocket'
Package not installed or not in node_modules.
fix
Run 'npm install kevoree-chan-websocket'.
TypeError: KevoreeChanWebSocket is not a constructor
Using CommonJS require() which returns undefined for ESM-only package.
fix
Use import statement instead of require().
WebSocket connection to 'ws://localhost/...' failed
WebSocket server not running or incorrect URL.
fix
Ensure a WebSocket server is running and the URL is correct.
Upgrade
Version history
3.0.0-SNAPSHOTlatest on npm
Audit
Dependencies
wsrequiredWebSocket client/server implementation used for Node.js
kevoree-entitiesrequiredBase Kevoree entities for channel implementation
Agent activity
18 hits · last 30 days
node
14
Amazon
1
OpenAI (training)
1
Resources
kevoree-chan-websocket — npm install kevoree-chan-websocket · libregistry