@coderbuzz/velox-ws-wire-server
v0.1.18
Published
Velox Wire Protocol server-side handler — transparent WebSocket binary protocol support for WireClient connections.
Maintainers
Readme
Velox Wire Server — @coderbuzz/velox-ws-wire-server
Server-side Wire Protocol handler for @coderbuzz/velox. Mount binary WebSocket handling on any route.
Quick Start
import { AppServer } from "@coderbuzz/velox";
import { wireProtocol } from "@coderbuzz/velox-ws-wire-server";
const app = new AppServer({ port: 3000 });
app.use("/ws", wireProtocol({
message(peer, msg) { peer.send(`echo: ${msg}`); },
}));
await app.run();Features
- Binary protocol — 80-93% bandwidth reduction vs JSON
- Token auth (upgrade or post-connect)
- Automatic heartbeat handling
- Pub/sub with per-peer topic management
- Request-response correlation
Installation
npm install @coderbuzz/velox @coderbuzz/velox-ws-wire @coderbuzz/velox-ws-wire-serverFull docs: DOCS.md
License
MIT
