[Qt-interest] QUdpSocket issue

Konrad Rosenbaum konrad at silmor.de
Thu Jan 21 07:26:20 CET 2010


On Wednesday 20 January 2010, Davide wrote:
> Hi all,
> I’ve got a strange behavior using QUdpSocket class: my pc receives a
> set of UDP packets that I can list with Wireshark but some of them are
> not received by the QUdpSocket object in my application.

You probably receive multiple packets at once, so you get signalled once, 
but have to retrieve multiple packets.

> while (1) {
> 		if(waitForReadyRead(1500)) {

insert here: while(hasPendingDatagrams()){

An btw: I wouldn't inherit from QUdpSocket to create this code - your camera 
handler HAS a socket, but inheriting suggests it IS a socket. Inheriting 
makes it harder to convert to TCP or another protocol if necessary.


	Konrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100121/a9a27f1a/attachment.bin 


More information about the Qt-interest-old mailing list