blob: 51ce69446daa690b4dec7e4aae6aa9870857d40f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#ifndef HELLOWORLDSERVER_H
#define HELLOWORLDSERVER_H
#include <QObject>
#include <QList>
class WebSocketServer;
class WebSocket;
class HelloWorldServer : public QObject
{
Q_OBJECT
public:
explicit HelloWorldServer(quint16 port, QObject *parent = 0);
Q_SIGNALS:
private Q_SLOTS:
void onNewConnection();
void processMessage(QString message, bool isLastFrame);
void socketDisconnected();
private:
WebSocketServer *m_pWebSocketServer;
QList<WebSocket *> m_clients;
};
#endif // HELLOWORLDSERVER_H
|