Registry / communication / websocket-over-nodejs

websocket-over-nodejs

JSON →
library0.0.8jsnpmunverified

A minimal WebSocket signaling server for WebRTC experiments, part of Muaz Khan's WebRTC-Experiment collection. Version 0.0.8 (latest) is a lightweight implementation that allows WebRTC peers to exchange signaling data over WebSocket connections. It includes presence detection for rooms/channels and is designed to integrate with the openSocket pattern used in many WebRTC experiments. The package is unmaintained since 2017 and relies on Node.js >=0.6. It uses the ws library but does not bundle it, requiring manual installation. Due to its age, it has known security issues and lacks support for modern Node.js versions.

npm install websocket-over-nodejs
INSTALL
IMPORT
SIG · WEBSOCKET-OVER-NOD
W
websocket-over-nodejs
communicationjavascriptv0.0.8
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.

server.js
Run directly via 'node server.js' after install
No importable module; this is a standalone server script, not a library.
WebSocket (client-side)
const socket = new WebSocket('wss://localhost:9449/')
const socket = require('websocket-over-nodejs')
The package is only a server; client uses native WebSocket API.
openSocket pattern
Use the openSocket function as shown in README to integrate with WebRTC experiments
Trying to require('websocket-over-nodejs').openSocket
The package does not export openSocket; it is user-defined in the client.

Install and run the WebSocket signaling server, then connect a client using the ws library.

npm install websocket-over-nodejs cd node_modules/websocket-over-nodejs npm install ws # ensure ws is installed node server.js # Server listens on port 9449. Open https://localhost:9449/ in browser. # Or connect WebSocket client to wss://localhost:9449/ # Example client: const WebSocket = require('ws'); const ws = new WebSocket('wss://localhost:9449/'); ws.on('open', () => { console.log('Connected'); });
Debug
Known issues
breakingPackage requires Node.js >=0.6 but does not work on Node.js >=7 due to deprecated APIs and missing ws dependency.
fix
Use an alternative like socket.io or a modern WebSocket server.
affects: >=0.0.0
deprecatedThe package is unmaintained; last update in 2017. No security patches or fixes.
fix
Replace with actively maintained WebSocket signaling server (e.g., PeerJS, Simple-Peer, or custom solution).
affects: >=0.0.0
gotchaPackage does not include the 'ws' module as a dependency in package.json; users must manually `npm install ws`.
fix
Run `npm install ws` inside node_modules/websocket-over-nodejs before starting server.
affects: >=0.0.0
breakingUses wss:// (secure WebSocket) by default but the certificate is self-signed; browsers will block the connection without security exceptions.
fix
Use `http://localhost:9449/` with ws:// instead, or configure a real certificate.
affects: >=0.0.0
breakingThe server.js uses `require('http')` and `require('fs')` but those modules have breaking changes in modern Node.js; may crash on startup.
fix
Do not use with Node.js v10 or later; consider alternatives.
affects: >=10.0.0
Errors
Common errors & fixes
Error: Cannot find module 'ws'
The ws package is not installed; it is a required peer dependency.
fix
Run `npm install ws` in the package directory or `npm install websocket-over-nodejs ws` globally.
Error: listen EADDRINUSE :::9449
Port 9449 is already in use by another process.
fix
Kill the process using port 9449 or change the port in server.js (hardcoded).
TypeError: Cannot read property 'on' of undefined
Attempting to use the package as a module (require) but it exports nothing.
fix
Do not import; run `node server.js` directly.
WebSocket connection to 'wss://localhost:9449/' failed: Error in connection establishment: net::ERR_CERT_AUTHORITY_INVALID
Self-signed certificate not trusted by browser.
fix
Use HTTP/ws:// by modifying server.js to use http.createServer instead of https, or add certificate exception in browser.
Upgrade
Version history
0.0.8latest on npm
Audit
Dependencies
wsrequiredWebSocket server implementation is required at runtime
Agent activity
33 hits · last 30 days
node
26
OpenAI (training)
1
Resources
websocket-over-nodejs — npm install websocket-over-nodejs · libregistry