what should i do to avoid that....!Did you check total size of received data ? Because some "tcp messages" may bound together, but not lost.
what should i do to avoid that....!Did you check total size of received data ? Because some "tcp messages" may bound together, but not lost.
Last edited by wysota; 3rd April 2008 at 19:54.
The fact that readyRead() was emitted less than 1000 times doesn't mean there are less than 1000 messages in the buffer. Instead of reading one message at a time, read as many messages at once as there are waiting in the buffer.
Qt Code:
while(sock->bytesAvailable()>=8){ doSomething(dat); }To copy to clipboard, switch view to plain text mode
Bookmarks