Results 1 to 2 of 2

Thread: qTCPSocket buffers

  1. #1
    Join Date
    Apr 2014
    Posts
    53
    Thanks
    9

    Default qTCPSocket buffers

    Hi,
    quick question: does qTcpSocket has a single buffer or does it has separate buffers one for writing and one for reading?

    The thing is, I am getting corrupt data at the server end which disappears when I use LowDelayOption on the client socket (because this way data is sent immediately). So I am wondering if my pending writes are being overwritten by the data that comes from the server into "read" buffer. Maybe I should subclass QAbstractSocket and do my own buffering, to solve this problem. Will appreciate very much your comments.

    TIA
    Nulik

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: qTCPSocket buffers

    You could check the sources but I would be surprised if there was only one buffer.

    That would be way more difficult to implement for very little gain (if there is one at all).

    But if you think that the buffer is interfering, maybe try opening the device unbuffered before attempting to reimplement it?

    Cheers,
    _

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

    nuliknol (15th August 2016)

Similar Threads

  1. About buffers, iostream objects, and files.
    By tonnot in forum General Programming
    Replies: 10
    Last Post: 31st May 2011, 13:18
  2. Problems semaphores and buffers
    By AndresBarbaRoja in forum Newbie
    Replies: 1
    Last Post: 10th March 2011, 09:06
  3. The best way to use buffers / streams/ strstreams
    By tonnot in forum General Programming
    Replies: 0
    Last Post: 28th February 2011, 09:32
  4. Dual frame buffers /dev/fb0 and /dev/fb1
    By ghassett in forum Qt Programming
    Replies: 0
    Last Post: 28th May 2009, 18:57
  5. Need help using multiple frame buffers
    By TTGator in forum Qt Programming
    Replies: 0
    Last Post: 20th November 2008, 17:45

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.