Skip to main content
Socket.prototype.emit - node__dgram.d.ts - Node documentation
method Socket.prototype.emit

Usage in Deno

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