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 CS_OK value if  successful,  CS_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
57       CS_ERR_TRY_AGAIN Resource temporarily unavailable
58
59       CS_ERR_INVALID_PARAM Invalid argument
60
61       CS_ERR_ACCESS Permission denied
62
63       CS_ERR_LIBRARY The connection failed
64
65       CS_ERR_INTERRUPT System call interrupted by a signal
66
67       CS_ERR_NOT_SUPPORTED The requested protocol/functionality not supported
68
69       CS_ERR_MESSAGE_ERROR Incorrect auth message received
70
71       CS_ERR_NO_MEMORY Not enough memory to complete the requested task
72
73
74
75corosync Man Page                 2004-08-31                       CPG_JOIN(3)
Impressum