Qt World Summit: Submit your Presentation

JoinMulticastGroup for all interfaces

  • Hello.

    I have Windows 7 with two interfaces (with IPv4 and IPv6). I want join both interfaces to multicast group, but joinMulticastGroup can't join both interfaces, and join only first interface. But, if I disable IPv6 on both interfaces joinMulticastGroup join all interfaces.

    @QUdpSocket udpSocket;
    QHostAddress groupAddress;

    groupAddress = QHostAddress("");
    udpSocket.bind(QHostAddress::AnyIPv4, 1900,
    QUdpSocket::ShareAddress | QUdpSocket::ReuseAddressHint);

    QList<QNetworkInterface> mListIfaces = QNetworkInterface::allInterfaces();

    for (int i = 0; i < mListIfaces.length(); ++i) {
    qDebug() << udpSocket.joinMulticastGroup(groupAddress, mListIfaces.at(i));

    "This bug":https://bugreports.qt-project.org/browse/QTBUG-30949 described my problem.
    How to solve this problem?

Log in to reply