#ifndef UDPSOCKET_H #define UDPSOCKET_H #include #include class UdpSocket : public QObject { Q_OBJECT private: QUdpSocket* _socket; const quint16 _port; 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