gsoap 客户端多个以太网
我有一个带有两张网卡的linux系统。 eth0 和 eth1。我正在创建一个发送的客户端 到端点 1.2.3.4。
我使用soap_call_函数发送我的网络服务。如何选择 eth1 而不是 eth0?
代码就像
soap_call_ns__add(&soap, server, "", a, b, &result);
如何在 &soap 变量内设置 eth0 或 eth1?
(gsoap 没有客户端绑定...如soap_bind)
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)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您希望从主机发出的包采用特定的路由(在本例中为特定的 NIC)?如果是这种情况,那么您必须调整内核路由表。
Shorewall 有关于此类设置的优秀文档。您将找到有关如何通过特定网络接口引导某些流量的信息。
You want outgoing packages from your host to take a specific route (in this case a specific NIC)? If that's the case, then you have to adjust kernels routing tables.
Shorewall has excellent documentation on that kind of setup. You'll find there info about how to direct certain traffic through a particular network interface.
对于 gsoap,我们需要在 tcp_connect 中的 connect(3) 之前手动绑定(2)
for gsoap we need to manually bind(2) before connect(3) in tcp_connect