Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Different multicast addresses but same port.

$
0
0

Hello,

I have multiple multicasts (with different destination addresses) but with the same destination port and same source address/port. How can I read the data from the different multicast seperately?

Currently, for a single multicast I'm creating a socket, binding to an interface/port and then joining the multicast group using setsockopt(). Creating another socket means I cannot bind to the port again.

I thought about using WSADuplicateSocket() but it requires a process ID and I'm not sure if using the current proces ID is the right thing to do.

Edit: It turns out that using WSADuplicateSocket() made both socket copies receive packets from both all multicasts.

Will I have to get the data with the header and manually foward the payload based on the destination multicast address?

Thanks.



Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>