mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
rename0
This commit is contained in:
65
Server/multithreadserver/multithreadserver.h
Normal file
65
Server/multithreadserver/multithreadserver.h
Normal file
@@ -0,0 +1,65 @@
|
||||
#ifndef MULTITHREADSERVER_H
|
||||
#define MULTITHREADSERVER_H
|
||||
|
||||
#include "serverlmswidget.h"
|
||||
#include "Systems/processingsystem.h"
|
||||
#include <QObject>
|
||||
|
||||
class ProcessingSystem;
|
||||
class MultiThreadServer : public QTcpServer
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MultiThreadServer(ServerLMSWidget *widget,UpdateController *updateController,ProcessingSystem *processingSystem,
|
||||
DataParser *dataParser, qint16 hostPort, QObject *parent = nullptr);
|
||||
|
||||
|
||||
QMap<int, ClientHandler *> *getClientsMap() const;
|
||||
void updateClientList();
|
||||
void disableClients();
|
||||
|
||||
bool startServer();
|
||||
bool stopServer();
|
||||
void blockAutorization()
|
||||
{
|
||||
stateBlockAutorization = blocked;
|
||||
}
|
||||
void unBlockAutorization()
|
||||
{
|
||||
stateBlockAutorization = unblocked;
|
||||
}
|
||||
EStateBlockAutorization getStateBlockAutorization() const
|
||||
{
|
||||
return stateBlockAutorization;
|
||||
}
|
||||
EStateServer getStateServer()
|
||||
{
|
||||
return stateServer;
|
||||
}
|
||||
signals:
|
||||
void sigInitClient(int descriptor, ServerLMSWidget *serverWidget,
|
||||
UpdateController *updateController, DataParser *dataParser);
|
||||
void signalStopSendFile();
|
||||
|
||||
public slots:
|
||||
void slotDisconnectClient(QString peerAddress, QString peerPort);
|
||||
protected:
|
||||
void incomingConnection(qintptr handle) override;
|
||||
|
||||
private:
|
||||
ServerLMSWidget *serverLmsWidget;
|
||||
QMap<int, ClientHandler*> *clientsMap;
|
||||
qint16 hostPort;
|
||||
ProcessingSystem *processingSystem;
|
||||
UpdateController *updateController;
|
||||
DataParser *dataParser;
|
||||
|
||||
EStateServer stateServer;
|
||||
EStateBlockAutorization stateBlockAutorization;
|
||||
|
||||
void removeClient(int idSocket);
|
||||
void addClient(qintptr descriptor, ClientHandler *client);
|
||||
};
|
||||
|
||||
#endif // MULTITHREADSERVER_H
|
||||
Reference in New Issue
Block a user