#ifndef WSSERVER_H #define WSSERVER_H #include #include #include #include "WSRequestHandler.h" QT_FORWARD_DECLARE_CLASS(QWebSocketServer) QT_FORWARD_DECLARE_CLASS(QWebSocket) class WSServer : public QObject { Q_OBJECT public: explicit WSServer(quint16 port, QObject *parent = Q_NULLPTR); virtual ~WSServer(); void broadcast(QString message); private Q_SLOTS: void onNewConnection(); void socketDisconnected(); private: QWebSocketServer *_wsServer; QList _clients; }; #endif // WSSERVER_H