TsgcWebSocketClient › 属性 › TLS
启用到 WebSocket 服务器的安全 TLS/SSL 连接。
property TLS: Boolean read FTLS write FTLS;
False
将 TLS 设置为 True 以协商安全(wss://)连接。其他 TLS 参数(证书文件、验证、TLS 版本、IOHandler)通过 TLSOptions 配置。分配 wss:// URL 会自动将 TLS 设置为 True。
oClient := TsgcWebSocketClient.Create(nil);
oClient.Host := 'www.esegece.com';
oClient.Port := 2053;
oClient.TLS := true;
oClient.Active := true;