Worker.prototype.emit - Node documentation
method Worker.prototype.emit

Usage in Deno

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

Parameters

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

Return Type

boolean
Worker.prototype.emit(event: "disconnect"): boolean

Parameters

event: "disconnect"

Return Type

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

Parameters

event: "error"
error: Error

Return Type

boolean
Worker.prototype.emit(
event: "exit",
code: number,
signal: string,
): boolean

Parameters

event: "exit"
code: number
signal: string

Return Type

boolean
Worker.prototype.emit(
event: "listening",
address: Address,
): boolean

Parameters

event: "listening"
address: Address

Return Type

boolean
Worker.prototype.emit(
event: "message",
message: any,
handle: net.Socket | net.Server,
): boolean

Parameters

event: "message"
message: any
handle: net.Socket | net.Server

Return Type

boolean
Worker.prototype.emit(event: "online"): boolean

Parameters

event: "online"

Return Type

boolean