7#include "myOutputStruct.h"
10#define LISTEN_PORT 1505
25 Server(QWidget *parent = 0)
27 udpSocket =
new QUdpSocket(
this);
28 udpSocket->bind(QHostAddress::LocalHost, LISTEN_PORT);
35 connect(udpSocket, SIGNAL(readyRead()),
this, SLOT(readPendingDatagrams()));
43 void readPendingDatagrams()
46 while (udpSocket->hasPendingDatagrams()) {
48 datagram.resize(udpSocket->pendingDatagramSize());
50 udpSocket->readDatagram((
char *)&FHSimData,
sizeof(FHSimData));
52 emit FhSimDataReceived( FHSimData) ;
59 QUdpSocket* udpSocket;
Definition: myOutputStruct.h:5