TsgcWebSocketClient › Proprietà › TLSOptions
Configura certificati, versione TLS, ALPN, IOHandler e altri dettagli di connessione sicura utilizzati quando TLS è abilitato.
property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;
—
Accessibile solo quando TLS è True. Le sotto-proprietà includono RootCertFile, CertFile, KeyFile, Password, VerifyCertificate, VerifyDepth, Version (da tlsUndefined a tls1_3), ALPNProtocols e IOHandler (iohOpenSSL o iohSChannel). Le impostazioni specifiche di OpenSSL si trovano in OpenSSL_Options e quelle specifiche di SChannel in 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;