Bun WebSocket Server empowers developers to implement scalable, production-ready real-time communication architectures in Bun. It guides users through native HTTP-to-WebSocket upgrades, topic-based pub/sub broadcasting, typed socket connection data, connection lifecycle handlers, compression tuning, and secure pre-upgrade authentication without requiring external WebSocket packages.
主な機能
01239 GitHub stars
02Native HTTP-to-WebSocket connection upgrade patterns
03Performance tuning with perMessageDeflate compression and backpressure limits
04Built-in topic pub/sub engine for rooms and channels
05Comprehensive lifecycle handlers for message, drain, ping, and close events
06Contextual typed data attachment to individual socket connections
ユースケース
01Streaming live server-sent telemetry, notifications, and event broadcasts
02Building real-time multiplayer chat applications and collaborative workspaces
03Implementing low-latency binary and JSON messaging services with authentication