23 lines
357 B
C++
Executable File
23 lines
357 B
C++
Executable File
#ifndef TCPSERVER_H
|
|
#define TCPSERVER_H
|
|
|
|
#include "TcpController.h"
|
|
#include <QTcpServer>
|
|
|
|
class TcpServer : public QTcpServer {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
TcpServer(QObject* parent = nullptr);
|
|
|
|
private slots:
|
|
void onReadyRead();
|
|
void onNewConnect();
|
|
|
|
private:
|
|
TcpController* controller;
|
|
QList<QTcpSocket*> clients;
|
|
};
|
|
|
|
#endif // TCPSERVER_H
|