2023-09-08 15:24:52 +02:00
|
|
|
// main.cpp
|
|
|
|
|
2023-09-08 14:42:37 +02:00
|
|
|
#include <QCoreApplication>
|
|
|
|
#include "udpclient.h"
|
2023-09-08 15:24:52 +02:00
|
|
|
#include <signal.h> // Include the signal header for handling signals
|
2023-09-08 14:42:37 +02:00
|
|
|
|
|
|
|
int main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
QCoreApplication a(argc, argv);
|
|
|
|
|
2023-09-08 15:24:52 +02:00
|
|
|
// Create and use the UDP client
|
|
|
|
UdpClient udpClient;
|
|
|
|
udpClient.startClient();
|
|
|
|
|
2023-09-08 14:42:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-08 15:24:52 +02:00
|
|
|
// Set up a signal handler for SIGINT (CTRL+C)
|
|
|
|
signal(SIGINT, [](int) { QCoreApplication::quit(); });
|
2023-09-08 14:42:37 +02:00
|
|
|
|
|
|
|
return a.exec();
|
|
|
|
}
|