tryTlsConnectAndReadBanner
tryTlsConnectAndReadBanner(
port,bannerPrefix,options?):Promise<boolean>
Defined in: net/try-tls-connect-n-read-banner.ts:18
Connects to port over TLS, reads the first line, and returns whether it starts with bannerPrefix. Returns false on any connection or read error, or on abort.
Use with waitFor from @ac-kit/core to poll until ready:
await waitFor(() => tryReadTlsBanner(port, banner), { signal: AbortSignal.timeout(30_000),});Parameters
Section titled “Parameters”number
bannerPrefix
Section titled “bannerPrefix”string
options?
Section titled “options?”TlsSocketConnectOptions
Returns
Section titled “Returns”Promise<boolean>