Results 1 to 4 of 4

Thread: Socket buffer fill

  1. #1
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Socket buffer fill

    Hi,
    My application connect to a external device which continuously sending data. This works fine in main window. If i open a popup window like FileOpen or FileSave or other custom popup window and try to move these windows, my external device stop sending the data. can anyone tell why it is like this. This behavior also exist, when i click minimize/colse button without releasing it.
    Precondition is: external device continuously sends large amount of data.

    Can anyone tell, how can i resolve this so that my external device doesnt stop even on user interaction on popup window?

    Thank you in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Socket buffer fill

    You can increase the buffer size of the receiving side or the sending buffer on the sending side.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    navi1084 (31st August 2009)

  4. #3
    Join Date
    Aug 2008
    Posts
    134
    Thanks
    10
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Re: Socket buffer fill

    Thank you for the reply.
    Can you tell me how can increase the buffer size.?
    And even if i increase the buffer size, and user hold the minimize/maximize button for long time then same problem occure. Is there any other alternative solution.

  5. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Socket buffer fill

    Quote Originally Posted by navi1084 View Post
    Can you tell me how can increase the buffer size.?
    This is OS dependent as you need to do that on TCP level.

    And even if i increase the buffer size, and user hold the minimize/maximize button for long time then same problem occure.
    Is there any other alternative solution.
    The ultimate solution is to use an operating system that doesn't block events when the window is dragged

    Apart from that you shouldn't use QDialog::exec() as it doesn't pass network traffic through. You should instead use QEventLoop and QDialog::setModal(). But of course you won't be able to use the native file dialog then...

    In my opinion you should just handle such situation in the application streaming data. The situation you described is not the only one where the TCP flow control kicks in and blocks the sender.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Socket Reading causes CPU to max out
    By tntcoda in forum Qt Programming
    Replies: 3
    Last Post: 25th May 2009, 00:07
  2. socket notifiers cannot be enabled from another thread
    By babu198649 in forum Qt Programming
    Replies: 5
    Last Post: 4th April 2009, 15:15
  3. Socket Reading Advice
    By tntcoda in forum Qt Programming
    Replies: 3
    Last Post: 4th July 2008, 11:26
  4. Greenphone mini USB socket problem
    By izico in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 25th September 2007, 11:59
  5. Socket bind error
    By rburge in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2007, 00:18

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.