Not all packets received by QUdpSocket
-
I've got QUdpSocket binding some port. I make a slot which I connect with signal readyRead(). Looks like this:
@ while (m_socket->hasPendingDatagrams()) {
QByteArray datagram;
datagram.resize(m_socket->pendingDatagramSize());
QHostAddress sender;
quint16 senderPort;
m_socket->readDatagram(datagram.data(), datagram.size(), &sender, &senderPort);
processDatagram(datagram, sender, senderPort);
}@
When I send a lot of datagrams(200 or more) from another program to binding port I receive not all of them (but in Wireshark I can see all of them). If I make some waiting before sending each command I receive them all. -
I guess you are aware of the implications of udp. There is no guarantee to receive all packets nor to receive them all in the right sequence.
For your application do you check this in debug mode and in the debugger?
If, yes, this might have additional delays in processing which might explain the missing packages.
-
I'm talking not about sequence I'm talking about number of datagrams. From one side I sent 200 datagrams, from another(in debuger mode) in slot I received only 50. In Wireshark I see all 200, that means that packets received by network interface without losses.
-
I have this problem too . wireshark show my computer have received all the pack,but my qudpsocket can't.
In my case,when I minimize my qt app window ,my app can receive all the pack with no problem.BUT when I move my mouse pointer around over my app, qudpsocket loss pack badly. -
I have this problem too . wireshark show my computer have received all the pack,but my qudpsocket can't.
In my case,when I minimize my qt app window ,my app can receive all the pack with no problem.BUT when I move my mouse pointer around over my app, qudpsocket loss pack badly.