Skip to main content
Server.prototype.on - node__tls.d.ts - Node documentation
method Server.prototype.on

Usage in Deno

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