Module

std/node/dgram.ts>Socket#close

Deno standard library
Go to Latest
method Socket.prototype.close
import { Socket } from "https://dotland.deno.dev/std@0.177.0/node/dgram.ts";

Close the underlying socket and stop listening for data on it. If a callback is provided, it is added as a listener for the 'close' event.

Parameters

optional
callback: () => void

Called when the socket has been closed.