1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- #ifndef DEVINFOTCPSERVER_H
- #define DEVINFOTCPSERVER_H
- #include <QObject>
- #include <QTcpServer>
- #include <QTcpSocket>
- #include <QDateTime>
- #include <QNetworkAccessManager>
- #include <QNetworkRequest>
- #include <QNetworkReply>
- #include <QSslConfiguration>
- #include <QVariant>
- #include <QJsonDocument>
- #include <QJsonObject>
- #include <QJsonValue>
- #include <QJsonArray>
- #include <QJsonParseError>
- #include <QCryptographicHash>
- class DevInfoTcpServer : public QObject
- {
- Q_OBJECT
- public:
- explicit DevInfoTcpServer(QObject *parent = nullptr);
- void start();
- void app_info(QString url,QString key,QString signature);
- signals:
- void tcp_log(QString log);
- void append_sql(QString sql);
- public slots:
- void new_incomming();
- void read_data();
- void finishedSlot(QNetworkReply *reply);
- private:
- QTcpServer *svr;
- QTcpSocket *so;
- QNetworkAccessManager *networkManager;
- QSslConfiguration config;
- QString url, key, signature;
- };
- #endif // DEVINFOTCPSERVER_H
|