Quote Originally Posted by wysota View Post
Do you read the data from the socket anywhere?
yes, right after.

Qt Code:
  1. QDataStream in(tcpSocket);
  2. in.setVersion(QDataStream::Qt_4_5);
  3.  
  4. forever {
  5. if (nextBlockSize == 0){
  6. if (tcpSocket->bytesAvailable() < sizeof (qint64))
  7. break;
  8. in >> nextBlockSize;
  9. cout << "Block size: " << QString::number(nextBlockSize).toStdString() << endl;
  10. }
  11.  
  12. if (tcpSocket->bytesAvailable() < nextBlockSize)
  13. {
  14. cout << "Going to break" << endl;
  15. break;
  16. }
  17.  
  18. in >> _applicationCall;
  19. in >> _classCall;
  20. in >> _methodCall;
  21. in >> _eBusinessObject;
  22. in >> qba;
  23. }
To copy to clipboard, switch view to plain text mode 

and this works if the qba (QByteArray) is small but when it's large like the one I want to store the server stops. Probably it waits until it receives data = 31525678435008617 bytes which means forever.