Issue with two UDP sockets for two Ethernet interfaces

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Issue with two UDP sockets for two Ethernet interfaces

760件の閲覧回数
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 返答(返信)