WebSockets & SSL
HTTP communication can be done in two different ways, secure and non-secure. Secure connection is done using https:// protocol while http:// is for non-secure connections. Likewise, WebSockets connections can be done either using non-secure ws:// protocol or secure wss:// protocol. If the web page uses a https secure connection then WebSocket connection also should use wss protocol. Web browsers enforce same-protocol policy when your web page is accessed from a domain. The only exception is when you access it from localhost. This means that you can use a non-secure WebSockets connection along with a secure web page if your domain is localhost.
uniGUI uses the same principles when establishing WebSocket connections. If the web page uses https then wss will be used for the WebSocket connection. This behavior can be overridden by setting the AlwaysUseHTTP property to True. In this case WebSockets will use a non-secure connection regardless of the web page. This is useful for test purposes only when your application runs in localhost. In a production environment AlwaysUseHTTP should always be False; otherwise the connection will be rejected by the browser, as mixing secure and non-secure content will be blocked.
You can use ws:// (non-secure) with a secure web page only when the page is served from localhost. For any other domain the browser will block mixed (secure/non-secure) content.
Do not set AlwaysUseHTTP = True in production — browsers will reject mixed secure/non-secure connections.
WebSockets SSL settings can be different based on deployment method.
Standalone Server and Service
In this case no special consideration is needed. The same SSL setup will be used for WebSockets. i.e., if your web page SSL connection works flawlessly your secure WebSocket connection will be established.
ISAPI or Apache Module
This can be more complicated. If you use an auxiliary port on the same domain you need to use the same certificate files to populate ServerModule SSL settings based on instructions in the SSL Configuration. Please note that under normal conditions for ISAPI or Apache modules no SSL configuration is done for uniGUI, but if the same application module is going to run its own internal WebSockets server on a different port or IP address, it is necessary to correctly set up the SSL Configuration.