Skip to main content
Server.prototype.once - net - Node documentation
method Server.prototype.once

Usage in Deno

import { Server } from "node:net";
Server.prototype.once(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

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

Return Type

this
Server.prototype.once(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Server.prototype.once(
event: "connection",
listener: (socket: Socket) => void,
): this

Parameters

event: "connection"
listener: (socket: Socket) => void

Return Type

this
Server.prototype.once(
event: "error",
listener: (err: Error) => void,
): this

Parameters

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

Return Type

this
Server.prototype.once(
event: "listening",
listener: () => void,
): this

Parameters

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

Return Type

this
Server.prototype.once(
event: "drop",
listener: (data?: DropArgument) => void,
): this

Parameters

event: "drop"
listener: (data?: DropArgument) => void

Return Type

this
Back to top