Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Problem transfering bigger data amounts over Websockets on iOS
Qt 6.11 is out! See what's new in the release blog

Problem transfering bigger data amounts over Websockets on iOS

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 893 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    M.Steinhilber
    wrote on last edited by
    #1

    Hi,

    I currently have a problem with websockets on iOS. I'm using a websocket connection to send commands and files over a network (WiFi) between 2 devices. The server is a Windows CE device with Qt5.3 and the client can be an iPad or Windows PC, using a program compiled with Qt 5.7.1. The files are transfered by breaking them into smaller parts (~20-300KB, depending on the speed of the last part) and sending them as a websocket message. There is a small protocol implemented to coordinate the parts.

    Especially when transfering bigger files(>200MB) over the network, at some point i always run into a disconnect of the socket with the closeReason "Timeout when reading data from socket." on the Client. The server then gives a normal disconnect without closeReason.

    My first question is: Is this a normal closeReason for a disconnect in case of a bad WiFi connection or could it be a bug in my software or even in Qt's Websocket implementation? I did force some disconnects by powering off the server device while transfering data, and I did not get the same error on the client.

    I also found the QTBUG-14975 which very much sounds like my issue. The closeReason is set in qwebsocketframe.cpp after a waitForReadyRead(5000). But the main differences are that this bug is only reported as happening on Windows and about every 4-5GB transmitted. In my case it's happening only on iOS and about every 200-300 MB.

    Since the problem only happens on iOS(iPad and simulator) but not with a Windows PC as client, i am also thinking about, if this could be an OS related problem. Like iOS detecting a Wifi disconnect earlier when a Windows PC maybe waits a bit longer and the connections get better again.

    Would it be a solution to change the timeout of the waitForReadyRead(5000) in qwebsocketframe.cpp and compile a custom Qt? Is it likely that this will help?

    Thanks for any help on that topic. I'm investigating this problem for days and don't find any solution.

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

      Hi and welcome to devnet,

      That's something I'd recommend bringing to the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      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