46 lines
1.0 KiB
C++
46 lines
1.0 KiB
C++
#ifndef SERVERCONNECTIONMANAGER_H
|
|
#define SERVERCONNECTIONMANAGER_H
|
|
|
|
#include <QThread>
|
|
#include <QVector>
|
|
|
|
#include "serverforwardconnection.h"
|
|
|
|
|
|
class ServerConnectionManager : public QThread
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
ServerConnectionManager(ParameterData pD);
|
|
~ServerConnectionManager();
|
|
|
|
public:
|
|
int startThread();
|
|
void stopMainClientReciveLoop();
|
|
|
|
QVector < ServerForwardConnection * > forWardConnectionList;
|
|
client_TCP_Lib * mainClient;
|
|
|
|
|
|
private:
|
|
void run();
|
|
|
|
|
|
bool shoudStop;
|
|
ParameterData pD;
|
|
std::string mainClientMemAddr;
|
|
|
|
signals:
|
|
void newClientJoined();
|
|
void errorOccurred(int errorID, int VectorIndexIfExists =-1);
|
|
void transmittedBytesState(int index_who, bool isSendingToRecirectServer, unsigned long KbytesPerSec);
|
|
|
|
public slots:
|
|
void newConnectionNeeded();
|
|
void TransmittedBytesState(int index_who, bool isSendingToRecirectServer, unsigned long KbytesPerSec);
|
|
void ErrorOccurred(int errorID, int VectorIndexIfExists);
|
|
|
|
};
|
|
|
|
#endif // SERVERCONNECTIONMANAGER_H
|