Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
method dgram.Socket.prototype.close
import { dgram } from "https://deno.land/x/tellojs@v1.0.2/src/deps.ts";
const { Socket } = dgram;

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.