Re: Choosing the network interface for a socket

Jukka Rissanen

Hi Maik,

For listening socket you need to call bind() to assing the local
address. For sending socket, the local address (interface) is selected
automatically (if you have not bound the socket) according to
destination address.


On Fri, 2020-08-21 at 09:27 +0200, Maik Vermeulen wrote:

Currently I am playing with TCP sockets on a board that has both an
LTE-M modem, and an ethernet interface.

It is not clear to me how I can control whether the socket should
the LTE-M connection, or the ethernet interface.

Could anyone give me some pointers?

Best regards,
Maik Vermeulen

Join to automatically receive all group messages.