Hi, im trying to send/receive datagrams locally like this...
For the sender
Qt Code:
  1. udpSocket->connectToHost(leHost->text(), lePort->text().toUInt());
  2. QByteArray datagram = "//SearchingPlayers";
  3. qDebug() << "sent :: " << udpSocket->write(datagram);
To copy to clipboard, switch view to plain text mode 
Here i get 18 in console, then for the receiver...
Qt Code:
  1. QHostAddress *remoteHost = new QHostAddress;
  2. while( udpSocket->hasPendingDatagrams() ){
  3. QByteArray datagram;
  4. datagram.resize(udpSocket->pendingDatagramSize());
  5. datagram = udpSocket->read(datagram.size());
  6. qDebug() << "received :: " << datagram.data();
  7. }
To copy to clipboard, switch view to plain text mode 
And it just freezes before qDebug(), each code is in different functions
Im using localhost in leHost and port the port i bind in udpSocket->bind(45454); before in the constructor
any ideas? thanks