TsgcWebSocketClient › Properties › TLSOptions
Configures certificates, TLS version, ALPN, IOHandler and other secure-connection details used when TLS is enabled.
property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;
—
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 or iohSChannel). OpenSSL-specific settings live under OpenSSL_Options and SChannel-specific settings under SChannel_Options.
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;