Multicast with more NICs
Hello, I have an application which sends and receives multicast messages. It works fine, but now I have to change it to support more network interfaces. From one interface I will get response, from others not, but I don't know in general which one is the right one.
I tried it with creating a vector with multicastsockets for all (real) nics and iterate through the vector. In the part where I am waiting via socket.receive in a loop for every socket I have the problem, that receive blocks (maybe on the wrong socket) and so I don' t wait on the right socket. Therefore I thought, that making a separate thread for every socket with a separate receive method could solve my problem, but this is more work to do for me.
Is there an easy way to send and receive multicast messages via more nics? Especially waiting via socket.receive at the same time for all nics and react if data arrives through one of the nics?
Thanks for answers

