ws.io-server
v0.1.4
Published
High-performance WebSocket server for Bun
Maintainers
Readme
ws.io-server
High-performance WebSocket server for Bun, powered by WS.io binary protocol. Documentation: https://sarathkumar1207.github.io/ws.io/
Features
- Bun Native: Built on top of
Bun.serve. - Binary-First: No JSON overhead.
- Rooms: Easy room management (join/leave/to).
- ACKs: Reliable message acknowledgment.
- Encryption: Optional per-connection encryption.
Installation
bun add ws.io-serverUsage
import { Server } from "ws.io-server";
const io = new Server({ port: 3000 });
io.on("connection", (socket) => {
socket.on("message", (data) => {
socket.emit("reply", "received!");
});
});