Hi,
I currently port a Qt4 program to Qt5. I have the following trouble with a 
multicast socket.

On Qt4:

mReceiver = new QUdpSocket(this);
mReceiver->bind(1900, QUdpSocket::ReuseAddressHint|QUdpSocket::ShareAddress);
mReceiver->joinMulticastGroup("Address");

Works great.

Now under Qt5:
First I got a warning:
QAbstractSocket: cannot bind to QHostAddress::Any (or an IPv6 address) ... yada 
yada

Ok, so I changed the code:

mReceiver->bind(QHostAddress(QHostAddress::AnyIPv4),1900, 
QUdpSocket::ReuseAddressHint|QUdpSocket::ShareAddress);
mReceiver->joinMulticastGroup("Address");

Result? No warning. But I don't receive anything on this port either.

Help?

Guido
 
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to