LED-BOARD/simulation/VirtualLedBoard/udpserver.h

23 lines
390 B
C
Raw Normal View History

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