I've been trying to set up a websocket client using the Qt websocket class. Unfortunately I haven't been able to progress past the first step: connecting my client to a server.
I'm certain that the connection is possible because both the Go ws websocket client and the C++ easywsclient library can connect and interface with the server.
The relevant part of my code is the following:
QWebSocket socket;
socket.open(QUrl("ws://localhost:9999"));
qDebug() << socket.error() << socket.errorString();
When running the program, I get the following (unhelpful) message:
QAbstractSocket::UnknownSocketError "Unknown error"
Is there any way to clarify the error and/or fix the problem?
P.S. While the easywsclient library can connect and interface with the server it only does a marginal job, which is why I'd rather use the Qt class.