Reputation: 449
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
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