wss doesn't work with QWebSocket in QT 5.4.2
We have an app built with QT 5.4.2. We are planning to add websocket client support to the app.
So we started by testing the QWebSocket client sample code, i.e. sslechoclient, with wss://echo.websocket.org. (Free echo test server.)
We found wss doesn't work with QT 5.4.2, and there's no any additional information in the console. We also tested the latest QT 5.8 with the same sample code, wss works fine.
Does anyone know about this issue? Is this something we can workaround with QT5.4.2 or we have to upgrade to a newer version QT?
Btw, ws://echo.websocket.org works fine with both QT 5.4.2 and QT 5.8.
Oh, forgot to mention, the development environment is Windows 7.
And btw, for QT 5.4.2, we do have the corresponding version (1.0.1j) of openssl dll in PATH, our own app already relies on it. So openssl should not be a problem. On the other hand, we didn't do any particular setting for QT 5.8.
Hi and welcome to devnet,
You would need to check the logs from that module to see what happened there as to why things are working correctly now. It might also be related to a change in qtbase.
In any case, 5.4.2 is already pretty old. If you need long term support you should move to 5.6 or even more recent.
Thanks @SGaist !
We use the prebuilt QT libraries. Is there an interface to turn on the logging for a QT module? Under our configuration, we don't see any log from QWebSocket at least in the debug console.
Yes, there QLoggingCategory for that.
You need to lookup for the matching terms in the module sources.
However qtwebsockets doesn't seem like define any logging category.
Then you'll have to compile the module yourself to check what is done differently.