[Interest] QUdpSocket on Windows 10: QNetworkDatagram::destinationAddress/Port not set

Richard Öhlinger r.oehlinger at avibit.com
Tue Oct 3 16:28:15 CEST 2017


Hi,

I'm using QUdpSocket on Windows 10 to receive Multicast messages. Since 
Windows does not allow for binding directly to the multicast address 
I've to bind to the AnyIP and filter for destination address.

Therefore I use QUdpSocket::receiveDatagram to get a QNetworkDatagram. 
But its destinationAddress is not valid and destinationPort is -1.

The exact same code works on Linux. I'm using Qt 5.9.0

Is there a limitation on Windows systems? The Documentation would list 
it as supported [1].

Regards,

Richard

[1] https://doc.qt.io/qt-5/qnetworkdatagram.html#feature-support





More information about the Interest mailing list