Hi, I worked a little bit more on my problem. Is it possible, that QAbstractSocket::ShareAddress has not effect on Qt 5.1.1/64bit/linux?
I cannot get UPnP messages from my xbmc, when it runs on the same machine. With Qt4 this was not a problem. What I did now: I took the multicastreceiver from the examples. Only code I changed in it was the IP and the port: 239.255.255.250 and 1900. UPnP multicast. Now I checked with wireshark. When the multicastreceiver was not running, I was able to see the UPnP multicast messages, which were sent by the xbmc. When the multicastreceiver was running, no xbmc multicastmessages were visible in wireshark or in the multicastreceiver. UPnP multicast messages from other machines were received. Also when I start a second multicastreceiver, I get: QNativeSocketEngine::joinMulticastGroup() was not called in QAbstractSocket::BoundState I don't think this should happen, when I connect the first one with QAbstractSocket::ShareAddress Guido > 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 > _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest