Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. JoinMulticastGroup for all interfaces
Qt 6.11 is out! See what's new in the release blog

JoinMulticastGroup for all interfaces

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 1.4k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    UriahHeep
    wrote on last edited by
    #1

    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("239.255.255.250");
    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?

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved