12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #ifndef TCPSERVER_H
- #define TCPSERVER_H
- #include <QObject>
- #include <QDateTime>
- #include <QTcpServer>
- #include <QTcpSocket>
- #include <QNetworkAccessManager>
- #include <QNetworkRequest>
- #include <QNetworkReply>
- #include <QSslConfiguration>
- #include <QVariant>
- #include <QJsonDocument>
- #include <QJsonObject>
- #include <QJsonValue>
- #include <QJsonParseError>
- class TcpServer : public QObject
- {
- Q_OBJECT
- public:
- explicit TcpServer(QObject *parent = nullptr);
- void start();
- void app_info(QString url,QString key,QString signature);
- signals:
- void tcp_log(QString log);
- 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 // TCPSERVER_H
|