How is sender aware of which receiver nodeId's are connected to a multicast session #92
-
|
Hi guys, i am trying to build an app that needs to track the nodeIds that actually received the messages. I saw that I can add them to a list of AckingNodes via NormApi.AddAckingNode(), but how do i get the NodeIds that are currently active in the first place? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
|
btw, I compiled the code for 32bit windows platform. |
Beta Was this translation helpful? Give feedback.
-
|
Hi @luc1an, There are couple of ways to get this information to the sender:
2)A couple of the example apps (normCast.cpp, normStreamer.cpp) have an "ack auto" command-line option. The way this works is the sender can observe and track feedback messages (NACKs/ACKs including the responses for round-trip time probes) to learn the existence of receivers out there. A new API call (not yet in Developer's Guide) has been added to support this capability. The API call is:
where NormTrackingStatus can be NORM_TRACK_NONE, NORM_TRACK_RECEIVERS, NORM_TRACK_SENDERS, or NORM_TRACK_ALL For the "auto ack" option in those example apps, the "NORM_TRACK_RECEIVERS" is used. But if you know that other senders in a multi-sender multicast session will also be endpoints you desire to provide acknowledgement, you could use NORM_TRACK_ALL. When "AutoAcking" is enabled, the NORM_ACKING_NODE_NEW notification event is issued whenever a new "acking node" is added to the local sender session. When that notification event is dispatched (and your app harvests it via NormGetNextEvent()) you can use the NormNodeGetId(event.sender) call for application purposes to track who the current acking nodes (and use the NormGetNextAckingNode() approach to learn what nodes fail to acknowledge and choose whether to remove them from the acking node list ... it's up to the app on how "patient" it wants to be with receivers that fail to ACK. For example, you could have a policy of removing them from the list upon first failure or "three strikes and you're out", etc. And then they might later get re-added by the "AutoAcking" process if they are later detected messaging to the session as a sender and/or receiver depending on the "trackingStatus" you set. This basically allows a sender to dynamically track who is participating in a session and learn when they leave or rejoin depending on connectivity or user start/stop activity. If you look at the normCast.cpp example code (and I think I also put this option in the similar Python or Java examples, too). Hopefully this is helpful. best regards, Brian |
Beta Was this translation helpful? Give feedback.
Hi @luc1an,
There are couple of ways to get this information to the sender:
2)A couple of the example apps (normCast.cpp, normStreamer.cpp) have an "ack auto" command-line option. The way this works is the sender can observe and track feedback messages (NACKs/ACKs including the responses for round-trip time probes) to learn the existence of receivers out there. A new API call (not yet in Developer's Guide) has been added to support this capability. The API call is:
void NormSetAutoAckingNodes(NormSessionHandle sessionHandle, NormTrackingStatus trackingStatus);where NormTrackingStatus can be NORM_TRACK_NONE, NORM_TRACK_REC…