[Interest] QUdpSocket broken?

Guido Seifert wargand at gmx.de
Wed Sep 11 14:54:07 CEST 2013


Hi,
my QUdpSocket problems got worse. It is so broken that I don't believe that it's Qt code. But on the other hand, my code is too simple not to work.

I send a datagram from program 1:

qudpsocket->writeDatagram(<data>,QHostAdress(127.0.0.1),55555);

In the other program I connected a qudpsocket:

connect(qudpsocket,SIGNAL(readyRead()),this,SLOT(readyReadSlt()));
connect(qudpsocket,SIGNAL(stateChanged(QAbstractSocket::SocketState)),
this,SLOT(stateChangedSlt(QAbstractSocket::SocketState)));

qudpsocket->bind(QHostAddress(127.0.0.1),55555);

I checked the return values of all connects and the return value of bind. All true.
I get a state change in stateChangedSlt -> 4 (bound).

I see in wireshark that datagrams are sent. But i never get a readyRead() signal.
And no, no data somewhere lurking around. hasPendingDatagrams returns always false.

Any ideas?

Guido





More information about the Interest mailing list