Socket.prototype.emit - Node documentation
method Socket.prototype.emit

Usage in Deno

import { Socket } from "node:dgram";
Socket.prototype.emit(
event: string | symbol,
...args: any[],
): boolean

Parameters

event: string | symbol
...args: any[]

Return Type

boolean
Socket.prototype.emit(event: "close"): boolean

Parameters

event: "close"

Return Type

boolean
Socket.prototype.emit(event: "connect"): boolean

Parameters

event: "connect"

Return Type

boolean
Socket.prototype.emit(
event: "error",
err: Error,
): boolean

Parameters

event: "error"
err: Error

Return Type

boolean
Socket.prototype.emit(event: "listening"): boolean

Parameters

event: "listening"

Return Type

boolean
Socket.prototype.emit(
event: "message",
msg: Buffer,
rinfo: RemoteInfo,
): boolean

Parameters

event: "message"
msg: Buffer
rinfo: RemoteInfo

Return Type

boolean