Skip to main content
CommonConnectionOptions.SNICallback - node__tls.d.ts - Node documentation
property CommonConnectionOptions.SNICallback

Usage in Deno

```typescript import { type CommonConnectionOptions } from "node:node__tls.d.ts"; ```
SNICallback(servername, cb) A function that will be called if the client supports SNI TLS extension. Two arguments will be passed when called: servername and cb. SNICallback should invoke cb(null, ctx), where ctx is a SecureContext instance. (tls.createSecureContext(...) can be used to get a proper SecureContext.) If SNICallback wasn't provided the default callback with high-level API will be used (see below).

Type

((
servername: string,
cb: (
err: Error | null,
) => void
,
) => void) | undefined