socketio-rust-emitter
A Rust implementation of socket.io-emitter.
How to use
use Utc;
use thread;
use Duration;
let io = new;
let _ = spawn.join;
// Different constructor options.
//1. Initialize with host:port string
let io = new
// 2. Initlize with host, port object.
let io = new;
Examples
let io = new;
// sending to all clients
io.clone.emit;
// sending to all clients in "game" room
io.clone.to.emit;
// sending to individual socketid (private message)
io.clone.to.emit;
let nsp = io.clone.of;
// sending to all clients in "admin" namespace
nsp.clone.emit;
// sending to all clients in "admin" namespace and in "notifications" room
nsp.clone.to.emit;