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.
29 lines
451 B
29 lines
451 B
#ifndef UDPSOCKET_H
|
|
#define UDPSOCKET_H
|
|
|
|
#include <QObject>
|
|
#include <QUdpSocket>
|
|
|
|
class UdpSocket : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private:
|
|
QUdpSocket* _socket;
|
|
const quint16 _port;
|
|
|
|
QString getTime();
|
|
|
|
public:
|
|
explicit UdpSocket(QObject* parent = nullptr, quint16 port = 1234);
|
|
|
|
void sayHello();
|
|
void sayMsg(QString Msg);
|
|
|
|
//uncrustify off
|
|
public slots:
|
|
//uncrustify on
|
|
void readyRead();
|
|
};
|
|
|
|
#endif //UDPSOCKET_H
|
|
|