IP Multicast: How Do I Know If Someone Has Subscribed?

I've been looking through various docs (.NET WinSock, C ++ boost :: asio) about multicast. One of my problems is I can't figure out how you know if there is at least 1 subscriber for a group. The reason I need is that there isn't much point in creating data if no one is listening to it. Is there a message sent back from the next hop about the current state of the tree? Is there some kind of event that fires when the first subscriber appears or when the last leaves?

+3


source to share


2 answers


Refer to this article under " How does multicast work .

In short, your application does not need to track multicast subscriptions; the router does this for you. If you have multicast data to create, then do it - the router will take care of whether this data is sent to subscribers.



There are no events that the router calls to notify you of subscriptions. If you want some notifications, you will need to create this functionality in your own custom protocol implementation and require your clients to explicitly notify the host.

+4


source


You may know that if you can send an IGMP QUERY message, or maybe by listening for IGMP JOIN / LEAVE messages: you will only get one of them, unless you are connected to multiple routers. As long as the last IGMP message was a JOIN for your group and not a LEAVE, there is at least one subscriber.



+1


source







All Articles