Monday, 12 August 2013

waitForReadyRead returns empty string - Why isnt it blocking?

waitForReadyRead returns empty string - Why isnt it blocking?

I currenlty have a blocking model and the code where my client receives
data is as follows
QByteArray tick_stream;
clntSocket->waitForReadyRead(-1);
tick_stream = clntSocket->read(800);
Now I believe clntSocket->waitForReadyRead(); should only unblock when
there is data to be read from the socket however it seems that it unblocks
by itself and tick_stream is empty any suggetsions on what might be going
wrong ?

No comments:

Post a Comment