title: Qt TCP server/multi-client message reading
body: <p>I am working on a client/server application (using qt for tcp).
  The clients have to send about 15 messages per second to the server.
  The problem is this:<br>
  the messages from the clients are received in groups. What i mean:
  when i get the <code>readyRead()</code> signal and i read the data from the socket, there are multiple messages in the buffer.<br>
  This of-course causes lag in the system.  </p>
  
  <p>I tried putting the incoming connections in separate threads (thread per connection) but there was no improvement.<br>
  I also tried to rise a thread each time i got a <code>readyRead()</code> signal, but again nothing...</p>
  
  <p>BUT when i run a number of clients on the same pc as the server, everything seems ok. When using different pc's over the network, the lag occurs...
  (the network used is 100Mbps LAN, the messages are &lt;200KB, and ping between pc's is &lt;5msec, so i don't believe it's a network issue)</p>
  
  <p>On the client side, the code to write the data is pretty simple:  </p>
  
  <pre><code>tcpSocket-&gt;write(message.toUtf8());  
  tcpSocket-&gt;waitForBytesWritten();  
  tcpSocket-&gt;flush();
  </code></pre>
  
  <p>I also tried it without <code>flush()</code> or <code>waitForBytesWritten()</code> but the same...</p>
  
  <p>EDIT: Using Qt 4.8.4 and Windows 7 and XP</p>
  
  <p>Anybody has any idea how to overcome this?<br>
  Thank you in advance!</p>