C++ Multi-Client TCP Server with QList
<p>Necessary informations:</p>

<pre><code>  QList&lt;QTcpSocket*&gt; list;
  QTcpServer* server;
  QTcpSocket* socket;
</code></pre>

<p>In Qt I have built a TCP-Server(<strong>QTcpServer</strong>)! I have a <strong>QList</strong> with all my connected clients and I want to read the incomming data for each client personally. So if the <strong>QTcpServer</strong> gets a new connection, I handel it like this:</p>

<pre><code>void Server::newConnection()
{
   qDebug() &lt;&lt; "New Connection";
   list.append(server-&gt;nextPendingConnection());
   connect(list.last(),SIGNAL(readyRead()),this,SLOT(readyRead()));
}
</code></pre>

<p>How can I get the correct client (out of my <strong>QList</strong>), which send the <strong>SIGNAL</strong> <code>readyRead()</code>, in my <strong>SLOT</strong> <code>readyRead()</code>?</p>

<pre><code>void Server::readyRead(){
       //??
}
</code></pre>

<p>Any help is welcomed! </p>