Meysam Hit
Meysam Hit

Reputation: 449

Selecting an interface when multicasting on windows

I want to send data via a specific network interface

udpSocket->joinMulticastGroup(QHostAddress(Address),
                              QNetworkInterface::interfaceFromName(iface));

but, data is sending via another network interface. How can I force it to send data by that interface?

It is tested with SmartSniff.

Upvotes: 2

Views: 1843

Answers (1)

user207421
user207421

Reputation: 310884

Joining multicast groups is for receiving.

If you want your send() invocations to go on a specific interface you need to bind() to it.

Upvotes: 2

Related Questions