Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

std/node/dgram.ts>Socket#once

Deno standard library
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method Socket.prototype.once
import { Socket } from "https://deno.land/std@0.129.0/node/dgram.ts";

Parameters

event: "close"
listener: () => void

Parameters

event: "connect"
listener: () => void

Parameters

event: "error"
listener: (err: Error) => void

Parameters

event: "listening"
listener: () => void

Parameters

event: "message"
listener: (msg: Buffer, rinfo: RemoteInfo) => void

Parameters

event: string
listener: (...args: any[]) => void