I want to send a 1MB file at 200KB/second (5 second transfer) using a QTcpSocket. The ReadyRead slot function first reads the file size (header), then starts a thread that blocks while reading file_size bytes from the socket. But, since the readyRead slot function ends before the file transfer does, won't there be new calls for the readyRead function (new ReadyReads emitted) that would interfere?
i read here: How to make sure that readyRead() signals from QTcpSocket can't be missed? that while you are in the slot function no new ReadyReads will be emitted.