After spending better part of the night, I haven\'t been able to make it work. Here is what I\'m doing:
Figured it out with the help of MS guy. This seems to be a bug in DatagramSocket
class. You need to send at least one message on the multicast group before you start receiving multicast data from other advertisers. As a workaround, you can send an empty message before you start listening. More details and sample code can be found on this SO post (which is an absolutely simplified version of this question).
Additionally, it confirmed the following:
Control.MulticastOnly
to true
on the advertiser socket.BindServiceNameAsync()
if it is only doing multicasting.237.1.3.37
and any other address in the multicast range works for multicasting. 255.255.255.255 is not needed and shouldn't be used.Hope this helps someone down the road.