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

Usage in Deno

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

Parameters

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

Return Type

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

Parameters

event: "close"

Return Type

boolean
Server.prototype.emit(
event: "connection",
socket: Socket,
): boolean

Parameters

event: "connection"
socket: Socket

Return Type

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

Parameters

event: "error"
err: Error

Return Type

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

Parameters

event: "listening"

Return Type

boolean
Server.prototype.emit(
event: "drop",
data?: DropArgument,
): boolean

Parameters

event: "drop"
optional
data: DropArgument

Return Type

boolean