Server.prototype.on - Node documentation
method Server.prototype.on

Usage in Deno

import { Server } from "node:tls";
Server.prototype.on(
event: string,
listener: (...args: any[]) => void,
): this

Parameters

event: string
listener: (...args: any[]) => void

Return Type

this
Server.prototype.on(
event: "tlsClientError",
listener: (
err: Error,
tlsSocket: TLSSocket,
) => void
,
): this

Parameters

event: "tlsClientError"
listener: (
err: Error,
tlsSocket: TLSSocket,
) => void

Return Type

this
Server.prototype.on(
event: "newSession",
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: () => void,
) => void
,
): this

Parameters

event: "newSession"
listener: (
sessionId: Buffer,
sessionData: Buffer,
callback: () => void,
) => void

Return Type

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

Parameters

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

Return Type

this
Server.prototype.on(
event: "resumeSession",
listener: (
sessionId: Buffer,
callback: (
err: Error | null,
sessionData: Buffer | null,
) => void
,
) => void
,
): this

Parameters

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

Return Type

this
Server.prototype.on(
event: "secureConnection",
listener: (tlsSocket: TLSSocket) => void,
): this

Parameters

event: "secureConnection"
listener: (tlsSocket: TLSSocket) => void

Return Type

this
Server.prototype.on(
event: "keylog",
listener: (
line: Buffer,
tlsSocket: TLSSocket,
) => void
,
): this

Parameters

event: "keylog"
listener: (
line: Buffer,
tlsSocket: TLSSocket,
) => void

Return Type

this