23 lines
357 B
C
23 lines
357 B
C
|
#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
|