Skip to content

Instance Property

tlsServerName

iOS 16.0+ macOS 13.0+ tvOS 16.0+ watchOS 9.0+
The server name to use for certificate validation and SNI (Server Name Indication) when TLS is enabled. Defaults to none (but see below).
var tlsServerName: String?

Discussion

Note

When set to nil: If the connection is made to a server over TCP using init(host:port:username:password:database:tls:), the given host is used, unless it was an IP address string. If it was an IP, or the connection is made by any other method, SNI is disabled.