#ifndef SENDPROGTHREAD_H
#define SENDPROGTHREAD_H
#include <QThread>
#include <QFileInfo>
#include <QJsonValue>
#include <QJsonObject>
#include <QJsonDocument>
#include <QAbstractSocket>
#include <QSemaphore>
#include <QDataStream>

class SendProgThread : public QThread {
    Q_OBJECT
public:
    SendProgThread(const QString &progDir, const QString &ip, int port = 3333);
protected:
    void run();

signals:
    void emErr(QString);
    void emProgress(int);
public slots:
    void stop() {
        stoped = true;
    }

private:
    QString prog_dir;
    QString ip;
    int port = 3333;
    std::atomic_bool stoped{false};
};

#endif // SENDPROGTHREAD_H
