bigsnitch/networkthread.h
2020-08-26 20:58:36 +02:00

27 lines
550 B
C++

#pragma once
#include <QObject>
#include <includes.h>
#include <httpflow.h>
#include <set>
class NetworkThread : public QObject
{
Q_OBJECT
private:
std::set<std::string> received;
zmq::context_t context;
zmq::socket_t *socket;
std::set<std::string> accepted_flows;
void connect();
void disconnect();
void reconnect();
public:
explicit NetworkThread(QObject *parent = nullptr);
public slots:
void process();
signals:
void finished();
void error(QString err);
void httpMessage(http::Flow flow);
};