Beispiel #1
0
CGroupClient::CGroupClient(QObject *parent) :
    QTcpSocket(parent)
{
  connectionState = Closed;
  protocolState = Idle;
  setSocketOption(QAbstractSocket::KeepAliveOption, true);
  linkSignals();
}
Beispiel #2
0
CGroupClient::CGroupClient(QObject *parent) :
	QTcpSocket(parent)
{
	connectionState = Closed;

	linkSignals();
	protocolState = Idle;
}
Beispiel #3
0
CGroupClient::CGroupClient(QByteArray host, int remotePort, QObject *parent) :
  _host(host), _remotePort(remotePort), QTcpSocket(parent)
{
  linkSignals();
  setSocketOption(QAbstractSocket::KeepAliveOption, true);
  setConnectionState(Connecting);
  protocolState = AwaitingLogin;
  connectToHost(host, remotePort);
}
Beispiel #4
0
CGroupClient::CGroupClient(QByteArray host, int remotePort, QObject *parent) :
	QTcpSocket(parent)
{
	print_debug(DEBUG_GROUP, "Connecting to remote host...");
	setConnectionState(Connecting);
	print_debug(DEBUG_GROUP, "NOW issuing the connect command...");
	connectToHost(host, remotePort);
	protocolState = AwaitingLogin;

	linkSignals();

	if (!waitForConnected(5000)) {
		connectionState = CGroupClient::Quiting;
	    close();
	    print_debug(DEBUG_GROUP, "Server not responding!");
	    errorHandler(QAbstractSocket::ConnectionRefusedError);
	    //getParent()->changeType(CGroupCommunicator::Off);
	    return;
	}
}