Ejemplo n.º 1
0
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()));
}
Ejemplo n.º 2
0
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;
}