import { Namespace } from "https://deno.land/x/socket_io@0.2.0/packages/socket.io/lib/namespace.ts";
Targets a room when emitting.
Examples
const myNamespace = io.of("/my-namespace");
const myNamespace = io.of("/my-namespace");
// the “foo” event will be broadcast to all connected clients in the “room-101” room myNamespace.to("room-101").emit("foo", "bar");
// with an array of rooms (a client will be notified at most once) myNamespace.to(["room-101", "room-102"]).emit("foo", "bar");
// with multiple chained calls myNamespace.to("room-101").to("room-102").emit("foo", "bar");