Add wormhole state check function
[ric-plt/lib/rmr.git] / doc / src / man / rmr_wh_state.3.xfm
1 .if false
2 ==================================================================================
3         Copyright (c) 2020 Nokia 
4         Copyright (c) 2020 AT&T Intellectual Property.
5
6    Licensed under the Apache License, Version 2.0 (the "License");
7    you may not use this file except in compliance with the License.
8    You may obtain a copy of the License at
9
10        http://www.apache.org/licenses/LICENSE-2.0
11
12    Unless required by applicable law or agreed to in writing, software
13    distributed under the License is distributed on an "AS IS" BASIS,
14    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15    See the License for the specific language governing permissions and
16    limitations under the License.
17 ==================================================================================
18 .fi
19
20 .if false
21         Mnemonic        rmr_wh_state.xfm
22         Abstract        The manual page for the rmr_wh_state function.
23         Author          E. Scott Daniels
24         Date            6 March 2020
25 .fi
26
27 .gv e LIB lib
28 .im &{lib}/man/setup.im 
29
30 &line_len(6i)
31
32 &h1(RMR Library Functions)
33 &h2(NAME)
34         rmr_wh_state
35
36 &h2(SYNOPSIS)
37 &indent
38 &ex_start
39 #include <rmr/rmr.h>
40
41 int rmr_wh_state( void* vctx, rmr_whid_t whid )
42 &ex_end
43
44 &uindent
45
46 &h2(DESCRIPTION)
47 The &cw(rmr_wh_state) function will return the current state of the connection
48 associated with the given wormhole (whid). 
49 The return value indicates whether the connection is open (RMR_OK), or closed
50 (any other return value).
51
52 &space
53 When using some transport mechanisms (e.g. NNG), it may not be possible for
54 RMR to know the actual state and the connection may always be reported as
55 "open."
56
57 &h2(RETURN)
58 The following values are potential return values.
59
60 &space
61 &beg_dlist(.75i : ^&bold_font )
62 &di(RMR_OK)     
63         The wormhole ID is valid and the connection is "open."
64         &half_space
65
66 &di(RMR_ERR_WHID)
67         THe wormhole ID passed into the function was not valid.
68         &half_space
69
70 &di(RMR_ERR_NOENDPT)
71         The wormhole is not open (not connected).
72         &half_space
73
74 &di(RMR_ERR_BADARG)
75         The context passed to the function was nil or invalid.
76         &half_space
77
78 &di(RMR_ERR_NOWHOPEN)
79         Wormholes have not been initialised (no wormhole open call has been made).
80         &half_space
81 &end_dlist
82
83
84 &h2(SEE ALSO )
85 .ju off
86 rmr_wh_open(3),
87 rmr_wh_send_msg(3),
88 rmr_wh_close(3)
89
90 .ju on