Boost logo

Boost Users :

From: accelerator0099 (accelerator0099_at_[hidden])
Date: 2023-12-18 01:26:24


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_at_[hidden]
> https://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net