Is there anyway to remove and add a new listener to after the connext::Replier has been created? I pass in the listener via connext::ReplierParams when creating a replier, but after that is there any way to remove the listener and set a new one?
Thanks
Hello njc,
The connext::Requester as well as the connext::Replier use DDS DataWriters and DataReaders for both writing and reading requests and replies, respectively. This means that you can retrieve them and call any operation on them as you need.
For this particular example, the Replier's DataReader can be accessed by calling FooBarReplier_get_request_datareader. Then regular reader operations can be called on it, so for setting a listener, you can just call DDS_DataReader_set_listener. This operation will remove the current DataReader's listener if a NULL listener is passed as a parameter.
Antonio
Ah, makes sense. Thanks!