TsgcWebSocketClientProperties › TLSOptions

TLSOptions Property

Configures certificates, TLS version, ALPN, IOHandler and other secure-connection details used when TLS is enabled.

Syntax

property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;

Default Value

Remarks

Accessible only when TLS is True. Sub-properties include RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version (from tlsUndefined through tls1_3), ALPNProtocols and IOHandler (iohOpenSSL, iohSChannel, iohAndroidTLS or iohAppleTLS). On Android, iohAndroidTLS uses the platform native TLS (javax.net.ssl.SSLEngine) and on iOS and macOS, iohAppleTLS uses Apple native TLS, so no OpenSSL libraries need to be deployed; native platform TLS requires the Enterprise edition. OpenSSL-specific settings live under OpenSSL_Options and SChannel-specific settings under SChannel_Options.

Example


oClient := TsgcWebSocketClient.Create(nil);
oClient.URL := 'wss://www.esegece.com:2053';
oClient.TLSOptions.Version := tls1_2;
oClient.TLSOptions.VerifyCertificate := true;
oClient.TLSOptions.RootCertFile := 'cacert.pem';
oClient.Active := true;

Back to Properties