Search code examples
linuxnetwork-programminggsoap

gsoap client multiple ethernets


I have a linux system with two eth cards. eth0 and eth1. I am creating a client that sends to endpoint 1.2.3.4.

I send my webservice with soap_call_ functions. How can I select eth1 instead of eth0?

the code is like that

soap_call_ns__add(&soap, server, "", a, b, &result);

How can I set inside the &soap variable the eth0 or the eth1?

(gsoap does not have a bind for clients... like soap_bind)


Solution

  • for gsoap we need to manually bind(2) before connect(3) in tcp_connect