RecordControlApplication/TcpServer.h

26 lines
437 B
C
Raw Normal View History

2024-01-18 15:41:43 +08:00
#ifndef TCPSERVER_H
#define TCPSERVER_H
#include "TcpConnectionHandler.h"
#include "TcpRequestHandler.h"
2024-01-18 15:41:43 +08:00
#include <QTcpServer>
class TcpServer : public QTcpServer {
Q_OBJECT
public:
TcpServer(QObject* parent = nullptr);
~TcpServer();
void listen();
void close();
2024-01-18 15:41:43 +08:00
private slots:
void onNewConnect();
private:
QList<TcpConnectionHandler*> clients;
TcpRequestHandler* handler;
2024-01-18 15:41:43 +08:00
};
#endif // TCPSERVER_H