26 lines
437 B
C++
Executable File
26 lines
437 B
C++
Executable File
#ifndef TCPSERVER_H
|
|
#define TCPSERVER_H
|
|
|
|
#include "TcpConnectionHandler.h"
|
|
#include "TcpRequestHandler.h"
|
|
#include <QTcpServer>
|
|
|
|
class TcpServer : public QTcpServer {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TcpServer(QObject* parent = nullptr);
|
|
~TcpServer();
|
|
void listen();
|
|
void close();
|
|
|
|
private slots:
|
|
void onNewConnect();
|
|
|
|
private:
|
|
QList<TcpConnectionHandler*> clients;
|
|
TcpRequestHandler* handler;
|
|
};
|
|
|
|
#endif // TCPSERVER_H
|