CGroupClient::CGroupClient(QObject *parent) : QTcpSocket(parent) { connectionState = Closed; protocolState = Idle; setSocketOption(QAbstractSocket::KeepAliveOption, true); linkSignals(); }
CGroupClient::CGroupClient(QObject *parent) : QTcpSocket(parent) { connectionState = Closed; linkSignals(); protocolState = Idle; }
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); }
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; } }