Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QtWebEngine
  4. Sometimes HMI SW( websocket client ) sends an unmasked websocket packet and then session disconnected from server side.
QtWS25 Last Chance

Sometimes HMI SW( websocket client ) sends an unmasked websocket packet and then session disconnected from server side.

Scheduled Pinned Locked Moved Unsolved QtWebEngine
4 Posts 2 Posters 370 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    chaudb1
    wrote on last edited by chaudb1
    #1

    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 example

    QJsonDocument Document;
    …….
    webSocketClient->sendTextMessage(doc.toJson(QJsonDocument::Compact));

    Environment: QT 5.9.1, Mingw5.3.0 32bit

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      C 1 Reply Last reply
      0
      • SGaistS SGaist

        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.

        C Offline
        C Offline
        chaudb1
        wrote on last edited by chaudb1
        #3

        @SGaist

        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-i3vBYB6BftNB30iOROQbj42YsSEunm

        Please 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? ... "

        SGaistS 1 Reply Last reply
        0
        • C chaudb1

          @SGaist

          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-i3vBYB6BftNB30iOROQbj42YsSEunm

          Please 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? ... "

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          No I don't and I have no way to reproduce it based on your information.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved