Sha256: 309bd5911207d6e447d92709540c97073a39c950011a64286c58a78ba0b1740b
Contents?: true
Size: 709 Bytes
Versions: 4
Compression:
Stored size: 709 Bytes
Contents
#include <QLocalServer> #include "sunscraperrpcserver.h" #include "sunscraperrpc.h" SunscraperRPCServer::SunscraperRPCServer(QObject *parent) : QObject(parent) { m_localServer = new QLocalServer(); connect(m_localServer, SIGNAL(newConnection()), this, SLOT(onNewConnection())); } bool SunscraperRPCServer::listen(QString socketPath) { return m_localServer->listen(socketPath); } void SunscraperRPCServer::onNewConnection() { while(m_localServer->hasPendingConnections()) { QLocalSocket *socket = m_localServer->nextPendingConnection(); SunscraperRPC *rpc = new SunscraperRPC(socket); connect(rpc, SIGNAL(disconnected()), rpc, SLOT(deleteLater())); } }
Version data entries
4 entries across 4 versions & 1 rubygems