@radzor/sse-stream
Server-Sent Events (SSE) streaming server. Create named streams, push typed events, and manage client connections with automatic reconnection support.
Networkingv0.1.0typescriptServersseserver-sent-eventsstreamingrealtimehttppushby Radzor
Install
View source on GitHub →$npx radzor@latest add sse-stream
⚠ Constraints: Server-only. The createStream handler must be mounted on an HTTP server (Node http module, Express, Fastify, etc.). No external dependencies. Clients reconnect automatically via the retry field. Use keepAliveInterval to prevent proxy/load-balancer timeouts.
Inputs
| Name | Type | Default | Description |
|---|---|---|---|
| retryMs | number | 3000 | Reconnection interval hint sent to clients (default: 3000ms). |
| keepAliveInterval | number | 15000 | Interval in ms for sending keep-alive comments to prevent connection timeout (default: 15000). |
| maxClients | number | 1000 | Maximum number of concurrent SSE clients per stream (default: 1000). |
retryMsnumber
Reconnection interval hint sent to clients (default: 3000ms).
default: 3000
keepAliveIntervalnumber
Interval in ms for sending keep-alive comments to prevent connection timeout (default: 15000).
default: 15000