Testing with a SSL Application

In section Running the Dedicated Server on Default Ports we configured our dedicated server to run on default HTTP ports. We have already tested this configuration with a non-SSL application. Now let's test it with an SSL application to demonstrate that SSL applications can use the dedicated WebSockets server without any issues.

To do this we simply take our test Basic Chat application and convert it to an SSL application.

1

Step: Copy certificate files

After copying the related certificate files into the application folder, proceed to enable SSL in the application ServerModule.

ServerModule SSL setting
2

Step: No changes needed to WebSocketServer settings

There is no need to make any changes to the WebSocketServer settings. Since default HTTP ports are used, the application is able to connect to both secure and non-secure ports with the settings shown below.

WebSocketServer settings

Testing the application reveals that our settings are correct and the application is able to connect to our WebSockets server through a secure connection.

Secure connection test

If we examine the web application source code it shows that the WebSocket connection is made using the secure wss protocol:

uniWebSocketObj.createSocket("wss://socket.fmsoft.net/uniWebSocket/...)

WebSocket wss call