Skip to main content
Server.prototype.emit - node__net.d.ts - Node documentation
method Server.prototype.emit

Usage in Deno

```typescript import { Server } from "node:node__net.d.ts"; ```
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