2023-09-08 15:24:52 +02:00
|
|
|
// udpclient.h
|
|
|
|
|
2023-09-08 14:42:37 +02:00
|
|
|
#ifndef UDPCLIENT_H
|
|
|
|
#define UDPCLIENT_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QUdpSocket>
|
|
|
|
|
|
|
|
class UdpClient : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit UdpClient(QObject *parent = nullptr);
|
|
|
|
void startClient();
|
|
|
|
|
|
|
|
private:
|
|
|
|
QUdpSocket udpSocket;
|
|
|
|
|
2023-09-08 15:24:52 +02:00
|
|
|
public slots:
|
|
|
|
void receiveData();
|
2023-09-08 14:42:37 +02:00
|
|
|
void processPendingDatagrams();
|
2023-09-08 15:24:52 +02:00
|
|
|
|
2023-09-08 14:42:37 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // UDPCLIENT_H
|