#ifndef MULTITHREADSERVER_H
#define MULTITHREADSERVER_H

#include "serverlmswidget.h"

#include <QObject>


class MultiThreadServer : public QTcpServer
{
    Q_OBJECT

public:
    MultiThreadServer( ServerLMSWidget *widget,UpdateController *updateController,
        DataParser *dataParser,Logger *logger,QObject *parent = nullptr);

signals:
    void sigInitClient(int descriptor, ServerLMSWidget *serverWidget,
        UpdateController *updateController, DataParser *dataParser,Logger *logger);
    void signalStopSendFile();

public slots:
    void slotDisconnectClient(QString peerAddress, QString peerPort);
protected:
    void incomingConnection(qintptr handle) override;

private:
    ServerLMSWidget *serverLmsWidget;
    UpdateController *updateController;
    DataParser *dataParser;
    Logger *logger;
};

#endif // MULTITHREADSERVER_H
