#ifndef WEBSOCKETSERVER_H
#define WEBSOCKETSERVER_H

#include <QObject>
#include <QList>

#include "websocketclient.h"

QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
QT_FORWARD_DECLARE_CLASS(QWebSocket)

class WebsocketServer : public QObject
{
    Q_OBJECT
public:
    explicit WebsocketServer(QObject *parent = nullptr);
    ~WebsocketServer();

signals:

public slots:
    void onNewConnection();
    void socketDisconnected();

private:
    QWebSocketServer *m_pWebSocketServer;
    QList<WebsocketClient*>m_clients;
};

#endif // WEBSOCKETSERVER_H
