New to Qt. I'm having trouble understanding the difference between using QWebSocket with a secure url, "wss://..." and QSslSocket. Which one of these is necessary to establish secure communication with a server in Qt? Or is something different entirely?
The Qt example "Secure Socket Client Example" uses a normal QWebSocket with "wss://..." but the documentation and what seems intuitive for secure comm is using QSslSocket. Which one should I be using for a secure comm client implementation?
I'm securing my QWebSockets, which are not secured currently, and trying to understand the alternatives and best implementation for secure comm.
This is my first answer on stackoverflow. If you need WSS protocol you may use
QWebSocket. If you need HTTPS server you may useQSslSocketandQTcpServer. Or ready to use project e.g. github.com/azadkuh/qhttp, branch dev.Of course you may implement
QWebSocketyourself but onlyopenfunction contains about 2 pages of code and is based onQSslSocketandQTcpSocket.Sorry for so late answer but one year ago I wasn't interesting in this.