Again, we'll use a loop that waits for more data by calling QTcpSocket::waitForReadyRead_ In this loop, we're waiting until QTcpSocket::bytesAvailable() gives the full packet size.
Again, we'll use a loop that waits for more data by calling QTcpSocket::waitForReadyRead(). In this loop, we're waiting until QTcpSocket::bytesAvailable() returns the full packet size.