2023-08-13 22:38:07 +02:00
|
|
|
#ifndef UDPSERVER_H
|
|
|
|
#define UDPSERVER_H
|
|
|
|
|
|
|
|
#include <QAbstractItemModel>
|
|
|
|
#include <QUdpSocket>
|
|
|
|
|
2023-08-14 13:53:34 +02:00
|
|
|
class UdpLedServer : public QObject
|
2023-08-13 22:38:07 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2023-08-14 13:53:34 +02:00
|
|
|
explicit UdpLedServer (QObject *parent = nullptr);
|
2023-08-13 22:38:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
void initSocket();
|
|
|
|
void readPendingDatagrams();
|
|
|
|
QUdpSocket *mUdpSocket;
|
|
|
|
void processTheDatagram(QNetworkDatagram datagram);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // UDPSERVER_H
|