radarserver.h 618 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef RADARSERVER_H
  2. #define RADARSERVER_H
  3. #include <QObject>
  4. #include <QThread>
  5. #include <QWebSocket>
  6. #include <QWebSocketServer>
  7. #include <QString>
  8. #include <QDebug>
  9. class RadarServer : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. quint16 port;
  14. QWebSocketServer *m_pWebSocketServer;
  15. QList<QWebSocket *> m_clients;
  16. explicit RadarServer(QObject *parent = nullptr, quint16 port = 1235);
  17. virtual ~RadarServer();
  18. signals:
  19. void SigRadarGen(int order);
  20. public slots:
  21. void onNewConnection();
  22. void processMessage(QString message);
  23. void socketDisconnected();
  24. };
  25. #endif // RADARSERVER_H