Issue with two UDP sockets for two Ethernet interfaces

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Issue with two UDP sockets for two Ethernet interfaces

343 Views
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.

Labels (1)
Tags (1)
0 Kudos
0 Replies