PDA

View Full Version : qTCPSocket buffers



nuliknol
15th August 2016, 15:48
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

anda_skoa
15th August 2016, 18:52
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,
_