1xpaserver(3)                  SAORD Documentation                 xpaserver(3)
2
3
4

NAME

6       XPAServer: The XPA Server-side Programming Interface
7

SYNOPSIS

9       A description of the XPA server-side programming interface.
10

DESCRIPTION

12       Introduction to XPA Server Programming
13
14       Creating an XPA server is easy: you generally only need to call the
15       XPANew() subroutine to define a named XPA access point and set up the
16       send and receive callback routines.  You then enter an event loop such
17       as XPAMainLoop() to field XPA requests.
18
19         #include <xpa.h>
20
21         XPA XPANew(char *class, char *name, char *help,
22             int (*send_callback)(), void *send_data, char *send_mode,
23             int (*rec_callback)(),  void *rec_data,  char *rec_mode);
24
25         XPA XPACmdNew(char *class, char *name);
26
27         XPACmd XPACmdAdd(XPA xpa,
28                char *name, char *help,
29                int (*send_callback)(), void *send_data, char *send_mode,
30                int (*rec_callback)(),  void *rec_data,  char *rec_mode);
31
32         void XPACmdDel(XPA xpa, XPACmd cmd);
33
34         XPA XPAInfoNew(char *class, char *name,
35             int (*info_callback)(), void *info_data, char *info_mode);
36
37         int XPAFree(XPA xpa);
38
39         void XPAMainLoop(void);
40
41         int XPAPoll(int msec, int maxreq);
42
43         void XPAAtExit(void);
44
45         void XPACleanup(void);
46
47       Introduction
48
49       To use the XPA application programming interface, a software developer
50       generally will include the xpa.h definitions file:
51
52         #include <xpa.h>
53
54       in the software module that defines or accesses an XPA access point,
55       and then will link against the libxpa.a library:
56
57         gcc -o foo foo.c libxpa.a
58
59       XPA has been compiled using both C and C++ compilers.
60
61       A server program generally defines an XPA access point by calling the
62       XPANew() routine and specifies "send" and/or "receive" callback
63       procedures to be executed by the program when an external process
64       either sends data or commands to this access point or requests data or
65       information from this access point. A program also can define several
66       sub-commands for a single access point by calling XPACmdNew() and
67       XPACmdAdd() instead.  Having defined one or more public access points
68       in this way, an XPA server program enters its usual event loop (or uses
69       the standard XPA event loop).
70

SEE ALSO

72       See xpa(n) for a list of XPA help pages
73
74
75
76version 2.1.15                   July 23, 2013                    xpaserver(3)
Impressum