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
435 B
29 lines
435 B
#ifndef UDP_Socket_H
|
|
#define UDP_Socket_H
|
|
|
|
#include <QObject>
|
|
#include <QUdpSocket>
|
|
|
|
class UDP_Socket : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit UDP_Socket(QObject* parent = nullptr, quint16 port = 1234);
|
|
void SayHello();
|
|
void SayMsg(QString Msg);
|
|
|
|
private:
|
|
QString GetTime();
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
void readyRead();
|
|
|
|
private:
|
|
QUdpSocket* socket;
|
|
const quint16 the_port;
|
|
};
|
|
|
|
#endif //UDP_Socket_H
|
|
|