Hi,
I'm trying to re-implement the file-transfer feature in an MSN client. I receive a continuous data stream from the other contact. How can I read all the data without blocking GUI events? The other contact is transmitting faster then I can process the data.
I'm using a KExtendedSocket to stay compatible to KDE 3.1 environments.
All data is received during the readyRead() signal of the socket.
So far I've tried:
* using a while(socket->bytesAvailable() > 0) to read all data from the buffer. This way I'm chasing a moving target and never exit the loop.
* calling my slot again using QTimer::singleShotTast if there are still bytes available. This improves the GUI responsiveness, but failed when data was received too fast.
* using the processEvents() function. This caused a stack overflow, likely because it was called from a slot.
Does anyone know a working solution (or what is wrong with my early attempts)