[Qt-interest] waitForReadyRead() immediate return--why?
Thiago Macieira
thiago.macieira at trolltech.com
Thu Jul 30 08:36:18 CEST 2009
Joshua Senecal wrote:
>Hi All,
>
>I'm having a bit of difficulty with a QUdpSocket and waitForReadyRead().
>The bottom line is, a call to waitForReadyRead() returns immediately
>with true, but a call to getBytesAvailable() returns 0.
There are two reasons why that could happen:
1) you received a zero-sized UDP packet; those are rare, but they could
happen
2) you received an ICMP error message to your prior datagram being sent,
like ICMP Port Unreachable
>Any pointers on what might be causing this? I have one class where
>everything works as expected (waitForReadyRead() blocks until a datagram
>arrives) and in the other class it doesn't. I've gone over the code but
>I don't see any significant differences.
--
Thiago Macieira - thiago.macieira (AT) nokia.com
Senior Product Manager - Nokia, Qt Software
Sandakerveien 116, NO-0402 Oslo, Norway
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090730/5ca4fc25/attachment.bin
More information about the Qt-interest-old
mailing list