@radzor/websocket-server
WebSocket server with room-based messaging, client management, and broadcasting. Built on the ws library for Node.js.
Networkingv0.1.0typescriptServerwebsocketrealtimeserverroomsbroadcastwsby Radzor
Install
View source on GitHub →$npx radzor@latest add websocket-server
⚠ Constraints: Requires the 'ws' npm package. Server-only — does not run in browsers. Each client gets a UUID on connection. Rooms are created on first join and removed when empty. heartbeatInterval=0 disables ping/pong.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| port* | number | — | Port to listen on. |
| path | string | / | URL path for WebSocket connections (default: /). |
| maxPayloadSize | number | 1048576 | Maximum message payload size in bytes (default: 1048576 = 1MB). |
| heartbeatInterval | number | 30000 | Ping interval in milliseconds for detecting dead connections (default: 30000). |
port*number
Port to listen on.
pathstring
URL path for WebSocket connections (default: /).