Updated: April 19, 2023 |
Add a member to a group
#include <pips/publication.h>
pips_group_member_t* pips_group_add_member(pips_group_t *const group, pips_topic_t *const topic, const char *opt_name, void *const opt_usr_data)
This function adds the given topic to the current group. Publications created using this group will receive events from peers of the new member topic.
The member can be named explicitly. If no name is provided, the topic name is used. Members can be added to the group even if a publication has already been created for it; the associated publication will be updated accordingly.
The topic specified in group must have been allocated as a group topic using pips_create_group().
On success, a pointer to a handle to the member structure created by the group to manage the member topic. The memory returned by this function becomes owned by the caller, who is responsible for deleting it from the group. On error, NULL (errno is set).