lrio
Minimalist websocket broadcast server and browser client
Feature
- Broadcast messages using a dedicated channel
- Attach as many websocket server you want without collision
- Client for browserify
- Based on WebSocket-Node
Usage
npm install --save lrio
Server side
var http = ;var lrio = ;var server = http; var A = ;var B = ; server; // Broadcast message on myChannelAA // Broadcast message on myChannelBB // Other events :AA
Notice that client
are WebSocketConnection instances
Client side (using browserify)
var lrio = ; var A = ;var B = ; AB // Other events:AAA A; // Close websocketA; // Re-connect (only if closed)
License
The MIT license • Novadiscovery