static zyre_group_t * zyre_node_join_peer_group (zyre_node_t *self, zyre_peer_t *peer, char *name) { zyre_group_t *group = zyre_node_require_peer_group (self, name); zyre_group_join (group, peer); // Now tell the caller about the peer joined group zstr_sendm (self->pipe, "JOIN"); zstr_sendm (self->pipe, zyre_peer_identity (peer)); zstr_send (self->pipe, name); return group; }
static zyre_group_t * zyre_node_leave_peer_group (zyre_node_t *self, zyre_peer_t *peer, char *name) { zyre_group_t *group = zyre_node_require_peer_group (self, name); zyre_group_leave (group, peer); // Now tell the caller about the peer left group zstr_sendm (self->pipe, "LEAVE"); zstr_sendm (self->pipe, zyre_peer_identity (peer)); zstr_send (self->pipe, name); return group; }
static zyre_group_t * zyre_node_leave_peer_group (zyre_node_t *self, zyre_peer_t *peer, const char *name) { zyre_group_t *group = zyre_node_require_peer_group (self, name); zyre_group_leave (group, peer); // Now tell the caller about the peer left group zstr_sendm (self->outbox, "LEAVE"); zstr_sendm (self->outbox, zyre_peer_identity (peer)); zstr_sendm (self->outbox, zyre_peer_name (peer)); zstr_send (self->outbox, name); if (self->verbose) zsys_info ("(%s) LEAVE name=%s group=%s", self->name, zyre_peer_name (peer), name); return group; }