TsgcWebSocketClient属性 › TLSOptions

TLSOptions 属性

配置 TLS 启用时使用的证书、TLS 版本、ALPN、IOHandler 及其他安全连接详情。

语法

property TLSOptions: TsgcWSTLS_Options read FTLSOptions write SetTLSOptions;

默认值

备注

仅当 TLSTrue 时可访问。子属性包括 RootCertFileCertFileKeyFilePasswordVerifyCertificateVerifyDepthVersion(从 tlsUndefinedtls1_3)、ALPNProtocolsIOHandleriohOpenSSLiohSChannel)。OpenSSL 特定设置位于 OpenSSL_Options 下,SChannel 特定设置位于 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;

返回属性