1CPG_JOIN(3)               Openais Programmer's Manual              CPG_JOIN(3)
2
3
4

NAME

6       cpg_join - Joins one or more groups in the CPG library
7

SYNOPSIS

9       #include <openais/cpg.h>
10
11       int cpg_join(cpg_handle_t handle, struct cpg_name *group);
12

DESCRIPTION

14       The  cpg_join  function  is  used  to  join one group.  When a group is
15       joined, using the cpg_mcast_joined(3) function will  multicast  to  the
16       groups  joined in the argument handle.  The process will also get noti‐
17       fications of other processes joining and leaving the  group.   Messages
18       that  are sent to any of the groups joined to the parameter handle will
19       be delivered by cpg_dispatch(3).
20
21       This function may be only be called once for each handle. When a  group
22       has been joined the process will start to receive callbacks relating to
23       messages send from members of the group  or  notifications  of  process
24       joining/leaving the group.
25
26       Note  that  more  than  one  process can join a CPG group and each will
27       receive its own copy of any messages sent using cpg_mcast_joined()  and
28       its own confchg callback.
29
30       The argument group is used to specify the group to join.
31
32
33       The  groups argument is of the type struct cpg_name which is defined by
34       the structure:
35
36
37              struct cpg_name {
38                      int length;
39                      char value[128];
40              };
41

RETURN VALUE

43       This call returns the CPG_OK value if successful, CPG_ERR_INVALID_PARAM
44       if the handle is already joined to a group.
45

ERRORS

47       Not all errors are documented.
48

SEE ALSO

50       cpg_overview(8),   cpg_initialize(3),  cpg_finalize(3),  cpg_fd_get(3),
51       cpg_dispatch(3),   cpg_leave(3),    cpg_mcast_joined(3),    cpg_member‐
52       ship_get(3)
53
54openais Man Page                  2004-08-31                       CPG_JOIN(3)
Impressum