void Widget::tcpConnectClient() { logMessage("TCP: New client connected"); QTcpSocket *newClient = tcpServer->nextPendingConnection(); tcpClientsList << newClient; connect(newClient, SIGNAL(readyRead()), this, SLOT(tcpProcessPendingDatagrams())); connect(newClient, SIGNAL(disconnected()), this, SLOT(tcpDisconnectClient())); }
void Widget::tcpConnectClient() { #if DEBUG_LOG logMessage("TCP: New client connected"); #endif QTcpSocket *newClient = tcpServer->nextPendingConnection(); tcpClientsList << QPair<QTcpSocket*,QByteArray*>(newClient,new QByteArray()); connect(newClient, SIGNAL(readyRead()), this, SLOT(tcpProcessPendingDatagrams())); connect(newClient, SIGNAL(disconnected()), this, SLOT(tcpDisconnectClient())); }