import { Namespace } from "https://deno.land/x/socket_io@0.2.0/packages/socket.io/lib/namespace.ts";
Makes the matching socket instances disconnect.
Note: this method also works within a cluster of multiple Socket.IO servers, with a compatible Adapter.
Examples
const myNamespace = io.of("/my-namespace");
const myNamespace = io.of("/my-namespace");
// make all socket instances disconnect (the connections might be kept alive for other namespaces) myNamespace.disconnectSockets();
// make all socket instances in the "room1" room disconnect and close the underlying connections myNamespace.in("room1").disconnectSockets(true);