void MonServeur::newClientConnection() { QTcpSocket *newClient = nextPendingConnection(); qDebug() << "New Client "; _clients << newClient; connect(newClient,SIGNAL(readyRead()),this,SLOT(dataIncoming())); connect(newClient,SIGNAL(disconnected()),this,SLOT(clientDisconnected())); }
void CGroupClient::linkSignals() { connect(this, SIGNAL(disconnected()), this, SLOT(lostConnection() ) ); connect(this, SIGNAL(connected()), this, SLOT(connectionEstablished() ) ); connect(this, SIGNAL(error(QAbstractSocket::SocketError )), this, SLOT(errorHandler(QAbstractSocket::SocketError) ) ); connect(this, SIGNAL(readyRead()), this, SLOT( dataIncoming() ) ); buffer = ""; currentMessageLen = 0; }