Skip to main content
Socket.prototype.prependListener - Node documentation
method Socket.prototype.prependListener

Usage in Deno

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

Parameters

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

Return Type

this
Socket.prototype.prependListener(
event: "close",
listener: () => void,
): this

Parameters

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

Return Type

this
Socket.prototype.prependListener(
event: "connect",
listener: () => void,
): this

Parameters

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

Return Type

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

Parameters

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

Return Type

this
Socket.prototype.prependListener(
event: "listening",
listener: () => void,
): this

Parameters

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

Return Type

this
Socket.prototype.prependListener(
event: "message",
listener: (
msg: Buffer,
rinfo: RemoteInfo,
) => void
,
): this

Parameters

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

Return Type

this