import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.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
// make all socket instances disconnect (the connections might be kept alive for other namespaces)
io.disconnectSockets();
// make all socket instances disconnect (the connections might be kept alive for other namespaces) io.disconnectSockets();
// make all socket instances in the "room1" room disconnect and close the underlying connections io.in("room1").disconnectSockets(true);