MainDaemon::MainDaemon(QObject *parent) : QObject(parent){ curSock = 0; //no local socket connected yet server = new QLocalServer(this); //server->setMaxPendingConnections(10); //should go through them pretty fast, no need for more connect(server, SIGNAL(newConnection()), this, SLOT(checkForConnections())); SYSTEM = new Backend(this); }
SysCacheDaemon::SysCacheDaemon(QObject *parent) : QObject(parent){ curSock = 0; //no local socket connected yet server = new QLocalServer(this); //server->setMaxPendingConnections(10); //should go through them pretty fast, no need for more connect(server, SIGNAL(newConnection()), this, SLOT(checkForConnections())); DATA = new DB(this); QTimer::singleShot(300000, DATA, SLOT(startSync()) ); //wait five minutes to start the initial sync }
void SysCacheDaemon::requestFinished(){ //qDebug() << " - Request Finished"; curSock=0; //reset the internal pointer //Now look for the next request QTimer::singleShot(0,this, SLOT(checkForConnections())); }