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

Usage in Deno

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

Parameters

event: string
...args: any[]

Return Type

boolean
Server.prototype.emit(
event: "keylog",
line: Buffer,
tlsSocket: tls.TLSSocket,
): boolean

Parameters

event: "keylog"
line: Buffer
tlsSocket: tls.TLSSocket

Return Type

boolean
Server.prototype.emit(
event: "newSession",
sessionId: Buffer,
sessionData: Buffer,
callback: (
err: Error,
resp: Buffer,
) => void
,
): boolean

Parameters

event: "newSession"
sessionId: Buffer
sessionData: Buffer
callback: (
err: Error,
resp: Buffer,
) => void

Return Type

boolean
Server.prototype.emit(
event: "OCSPRequest",
certificate: Buffer,
issuer: Buffer,
callback: (
err: Error | null,
resp: Buffer,
) => void
,
): boolean

Parameters

event: "OCSPRequest"
certificate: Buffer
issuer: Buffer
callback: (
err: Error | null,
resp: Buffer,
) => void

Return Type

boolean
Server.prototype.emit(
event: "resumeSession",
sessionId: Buffer,
callback: (
err: Error,
sessionData: Buffer,
) => void
,
): boolean

Parameters

event: "resumeSession"
sessionId: Buffer
callback: (
err: Error,
sessionData: Buffer,
) => void

Return Type

boolean
Server.prototype.emit(
event: "secureConnection",
tlsSocket: tls.TLSSocket,
): boolean

Parameters

event: "secureConnection"
tlsSocket: tls.TLSSocket

Return Type

boolean
Server.prototype.emit(
event: "tlsClientError",
err: Error,
tlsSocket: tls.TLSSocket,
): boolean

Parameters

event: "tlsClientError"
err: Error
tlsSocket: tls.TLSSocket

Return Type

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

Parameters

event: "close"

Return Type

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

Parameters

event: "connection"
socket: Duplex

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: "checkContinue",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean

Parameters

event: "checkContinue"
req: InstanceType<Request>
res: InstanceType<Response>

Return Type

boolean
Server.prototype.emit(
event: "checkExpectation",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean

Parameters

event: "checkExpectation"
req: InstanceType<Request>
res: InstanceType<Response>

Return Type

boolean
Server.prototype.emit(
event: "clientError",
err: Error,
socket: Duplex,
): boolean

Parameters

event: "clientError"
err: Error
socket: Duplex

Return Type

boolean
Server.prototype.emit(
event: "connect",
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
): boolean

Parameters

event: "connect"
req: InstanceType<Request>
socket: Duplex
head: Buffer

Return Type

boolean
Server.prototype.emit(
event: "request",
req: InstanceType<Request>,
res: InstanceType<Response>,
): boolean

Parameters

event: "request"
req: InstanceType<Request>
res: InstanceType<Response>

Return Type

boolean
Server.prototype.emit(
event: "upgrade",
req: InstanceType<Request>,
socket: Duplex,
head: Buffer,
): boolean

Parameters

event: "upgrade"
req: InstanceType<Request>
socket: Duplex
head: Buffer

Return Type

boolean