コード例 #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()));
}
コード例 #2
0
ファイル: CGroupClient.cpp プロジェクト: GPUWorks/MMapper
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;
}