1CPG_JOIN(3)       Corosync Cluster Engine 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 <corosync/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, the cpg_mcast_joined(3) is called internally  to  multicast  to
16       the  groups  joined  in the argument handle.  The process will also get
17       notifications of other processes joining and leaving the  group.   Mes‐
18       sages that are sent to any of the groups joined to the parameter handle
19       will 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 sent from members of the group or notifications  of  processes
24       joining or leaving the group.
25
26       Note  that  more than one process on each node can join a CPG group and
27       each  will  receive  its  own  copy  of   any   messages   sent   using
28       cpg_mcast_joined() and 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_join(3),   cpg_leave(3),    cpg_mcast_joined(3),
52       cpg_membership_get(3)          cpg_zcb_alloc(3)         cpg_zcb_free(3)
53       cpg_zcb_mcast_joined(3)      cpg_context_get(3)      cpg_context_set(3)
54       cpg_local_get(3)
55
56
57corosync Man Page                 2004-08-31                       CPG_JOIN(3)
Impressum