Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/socket_io/mod.ts>Server#close

Socket.IO server for Deno
Latest
method Server.prototype.close
import { Server } from "https://deno.land/x/socket_io@0.2.0/mod.ts";

Closes the server.

Examples

const io = new Server(); const abortController = new AbortController();

await serve(io.handler(), { port: 3000, signal: abortController.signal, onListen: () => { setTimeout(() => { // close the HTTP server abortController.abort(); // close the Socket.IO server server.close(); }, 10000); } });