DaemonService/worker.h
筱傑 6a70501baa
update
增加手动移出白名单
连续连接移出白名单
2019-01-12 10:40:27 +08:00

33 lines
621 B
C++

#ifndef WORKER_H
#define WORKER_H
#include <QTcpSocket>
#include <QRunnable>
#include <QList>
class Worker : public QRunnable
{
public:
/**
* @brief 唯一构造
* @param socket对象
*/
Worker(qintptr socketDescriptor, const QList<int> &portList)
: m_socketDescriptor(socketDescriptor), m_portList(portList){}
protected:
/**
* @brief 线程运行方法
*/
virtual void run();
private:
/**
* @brief socket对象
*/
QTcpSocket *m_socket;
qintptr m_socketDescriptor;
QList<int> m_portList;
};
#endif // WORKER_H