Hi, im trying to send/receive datagrams locally like this...
For the sender
Here i get 18 in console, then for the receiver...Code:
udpSocket->connectToHost(leHost->text(), lePort->text().toUInt()); qDebug() << "sent :: " << udpSocket->write(datagram);
And it just freezes before qDebug(), each code is in different functionsCode:
while( udpSocket->hasPendingDatagrams() ){ QByteArray datagram; datagram.resize(udpSocket->pendingDatagramSize()); datagram = udpSocket->read(datagram.size()); qDebug() << "received :: " << datagram.data(); }
Im using localhost in leHost and port the port i bind in udpSocket->bind(45454); before in the constructor
any ideas? thanks