You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
524 B

#ifndef UDPSOCKET_H
#define UDPSOCKET_H
#include <QObject>
#include <QUdpSocket>
class UdpSocket : public QObject
{
Q_OBJECT
2 years ago
private:
QUdpSocket* _socket;
const quint16 _port;
2 years ago
void logReceivedData(QHostAddress& addr, quint16& port, QByteArray& msg);
public:
explicit UdpSocket(QObject* parent = nullptr, quint16 port = 1234);
~UdpSocket();
void sayHello();
void sayMsg(QString Msg);
//uncrustify off
public slots:
//uncrustify on
void readyRead();
};
#endif //UDPSOCKET_H