bigsnitch/networkthread.h

25 lines
457 B
C
Raw Normal View History

2020-08-08 11:44:16 +00:00
#pragma once
#include <QObject>
2020-08-09 12:07:14 +00:00
#include <includes.h>
2020-08-13 03:35:22 +00:00
#include <httpflow.h>
2020-08-08 11:44:16 +00:00
class NetworkThread : public QObject
{
Q_OBJECT
2020-08-09 12:07:14 +00:00
private:
2020-08-13 03:35:22 +00:00
zmq::context_t context;
zmq::socket_t *socket;
void connect();
void disconnect();
void reconnect();
2020-08-08 11:44:16 +00:00
public:
explicit NetworkThread(QObject *parent = nullptr);
public slots:
void process();
signals:
void finished();
void error(QString err);
2020-08-13 03:35:22 +00:00
void httpMessage(http::Flow flow);
2020-08-08 11:44:16 +00:00
};