Issue with two UDP sockets for two Ethernet interfaces

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Issue with two UDP sockets for two Ethernet interfaces

349 次查看
nikhilmoray
Contributor II

Hi,

I have bound socket 1 with the address of Ethernet 1 and second socket with the address of Ethernet 2. When I tried to send data from these sockets at the same time, it works well. But when I tried to receive from one of the sockets, it doesn't worked. None of the sockets are receiving any data.

On the contrary, when I bind two sockets with ADDR_ANY, both sockets starts receiving as well as transmitting the data. But when I tried to send the data from one of the sockets, both starts sending the data out at the same time. Means, when I call sendto function with the respective socket, both sockets sends the data out over the networks.

Kindly suggest the solution.

标签 (1)
标记 (1)
0 项奖励
0 回复数