Sometimes HMI SW( websocket client ) sends an unmasked websocket packet and then session disconnected from server side.
-
When using sendTextMessage() to go back and forth between server and client, the phenomenon of disconect with the server sometimes occurs. The rate of this phenomenon is very low.
Has anyone encountered this situation?HMI SW uses the Websocket layer supported in QT
source exampleQJsonDocument Document;
…….
webSocketClient->sendTextMessage(doc.toJson(QJsonDocument::Compact));Environment: QT 5.9.1, Mingw5.3.0 32bit
-
Hi and welcome to devnet,
5.9 is more that outdated so the first recommendation would be to update it to something actual.
The next thing you can do is to use a network analyzer like Wireshark to check what might be happening.
-
I have attached the Wireshark log file that was generated from QT 5.9.1 programming.
Link File : https://drive.google.com/drive/folders/1C-i3vBYB6BftNB30iOROQbj42YsSEunmPlease unzip the file and then open the unziped file by Wireshark.
The unzipped file has about 4 million sent text messages.
When you filter by "websocket.mask==false and tcp.srcport == 1058",
You will see 99 unmasked packages that were sent by EchoClient.
(server port is 1234, client port is 1058).Do you know which version of QT this bug does not appear from? ... "