import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts";
Sends a message to the other Socket.IO servers of the cluster.
Examples
io.serverSideEmit("hello", "world");
io.serverSideEmit("hello", "world");
io.on("hello", (arg1) => { console.log(arg1); // prints "world" });
// acknowledgements (without binary content) are supported too: io.serverSideEmit("ping", (err, responses) => { if (err) { // some clients did not acknowledge the event in the given delay } else { console.log(responses); // one response per client } });
io.on("ping", (cb) => { cb("pong"); });