123456789101112131415161718192021222324252627282930313233 |
- #ifndef WSCENTER_H
- #define WSCENTER_H
- #include <QObject>
- #include <QList>
- //#include <QtWebSockets/QWebSocket>
- //#include <QtWebSockets/QWebSocketServer>
- #include <QtNetwork/QSslError>
- #include "wsclient.h"
- QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
- QT_FORWARD_DECLARE_CLASS(QWebSocket)
- class WSCenter : public QObject
- {
- Q_OBJECT
- public:
- explicit WSCenter(QObject *parent = Q_NULLPTR);
- ~WSCenter();
- void checkLastNote(QString companyCode);
- signals:
- // void closed();
- public slots:
- void onNewConnection();
- void socketDisconnected();
- void onSslErrors(const QList<QSslError> &errors);
- private:
- QWebSocketServer *m_pWebSocketServer;
- QList<WSClient *> m_clients;
- };
- #endif // WSCENTER_H
|