Could you bind() it to one card by its address before connecting? Or changing the default routes' metrics? The card with a lower metric will be selected first.

Assuming that you have card 1 with address 192.168.1.2
Then you should
endpoint ep{ ip::make_address("192.168.1.2"), 0 };
socket.bind(ep);
On 12/18/23 00:16, Georg Gast via Boost-users wrote:
Hi there,
I wrote an application that is to a good part based on
https://www.boost.org/doc/libs/1_83_0/doc/html/boost_asio/example/cpp11/multicast/receiver.cpp

https://www.boost.org/doc/libs/1_83_0/doc/html/boost_asio/example/cpp11/multicast/sender.cpp


It worked OK on my laptop as the packages arrived in my vm and my host. As we tried it on real machines the packages did not arrive. (all windows machines). With
*netsh interface ip show joins*
I could see on my laptop that the join was on the ethernet card. On the real machines it choose "the wrong" network card. I tried with "outbound_interface" to change it but didn't work...

It's all ipv4. Can or should I use a static route to get the packages into the right net segment?

Bye Georg

_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________
Boost-users mailing list
Boost-users@lists.boost.org
https://lists.boost.org/mailman/listinfo.cgi/boost-users

Reply via email to