示例#1
0
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);
}
示例#2
0
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
}
示例#3
0
void SysCacheDaemon::requestFinished(){
  //qDebug() << " - Request Finished";
  curSock=0; //reset the internal pointer
  //Now look for the next request
  QTimer::singleShot(0,this, SLOT(checkForConnections()));
}