thanks for your answer. I looked at the source code from various examples... The problem is that i need a blocking function (no signals like readyRead() ...)

i only use socket.waitForReadyRead()... So how can i continue the function block only if i have all data?

Something like:

Qt Code:
  1. ...
  2. socket.waitForReadyRead();
  3.  
  4. inStream >> size;
  5.  
  6. if (size > socket.bytesAvailable())
  7. socket.waitForReadyRead();
  8.  
  9. instream >> database;
  10. ...
To copy to clipboard, switch view to plain text mode 
?

Sorry im new at network programming