#ifndef TCPSERVER1_H
#define TCPSERVER1_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>

class TcpServer1 : public QObject
{
    Q_OBJECT
public:
    explicit TcpServer1(QObject *parent = nullptr);
    void start();

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;

};

#endif // TCPSERVER1_H
