TsgcWebSocketServer_HTTPAPI › Properties › SSL
Enables TLS/SSL on the http.sys listener so that clients can connect using wss:// or https://.
public bool SSL { get; set; }
False
Set SSL to True to accept secure connections. Unlike OpenSSL-based servers, the http.sys listener reads the certificate from the Windows Certificate Store: configure SSLOptions.Hash with the hexadecimal thumbprint of the target certificate (and optionally CertStoreName, default MY). On activation the server calls HttpSetServiceConfiguration to bind the certificate to the host/port pair, which requires administrative rights unless the binding has been pre-registered with netsh http add sslcert and BindingOptions.ConfigureSSLCertificate is set to False.
oServer = new TsgcWebSocketServer_HTTPAPI();
oServer.Host = "127.0.0.1";
oServer.Port = 443;
oServer.SSL = true;
oServer.SSLOptions.Hash = "CERTIFICATE_HASH";
oServer.Active = true;