1xpaopen(3) SAORD Documentation xpaopen(3)
2
3
4
6 XPAOpen: allocate a persistent client handle
7
9 #include <xpa.h>
10
11 XPA XPAOpen(char *mode);
12
14 XPAOpen() allocates a persistent XPA struct that can be used with calls
15 to XPAGet(), XPASet(), XPAInfo(), XPAGetFd(), and XPASetFd(). Persis‐
16 tence means that a connection to an XPA server is not closed when one
17 of the above calls is completed but will be re-used on successive
18 calls. Using XPAOpen() therefore saves the time it takes to connect to
19 a server, which could be significant with slow connections or if there
20 will be a large number of exchanges with a given access point. The
21 mode argument currently is ignored ("reserved for future use").
22
23 An XPA struct is returned if XPAOpen() was successful; otherwise NULL
24 is returned. This returned struct can be passed as the first argument
25 to XPAGet(), etc. Those calls will update the list of active XPA con‐
26 nections. Already connected servers (from a previous call) are left
27 connected and new servers also will be connected. Old servers (from a
28 previous call) that are no longer needed are disconnected. The con‐
29 nected servers will remain connected when the next call to XPAGet() is
30 made and connections are once again updated.
31
32 Example:
33
34 #include <xpa.h>
35
36 XPA xpa;
37 xpa = XPAOpen(NULL);
38
40 See xpa(n) for a list of XPA help pages
41
42
43
44version 2.1.12 January 26, 2010 xpaopen(3)