Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xpaserver(3) [debian man page]

xpaserver(3)							SAORD Documentation						      xpaserver(3)

NAME
XPAServer - The XPA Server-side Programming Interface SYNOPSIS
A description of the XPA server-side programming interface. DESCRIPTION
Introduction to XPA Server Programming Creating an XPA server is easy: you generally only need to call the XPANew() subroutine to define a named XPA access point and set up the send and receive callback routines. You then enter an event loop such as XPAMainLoop() to field XPA requests. #include <xpa.h> XPA XPANew(char *class, char *name, char *help, int (*send_callback)(), void *send_data, char *send_mode, int (*rec_callback)(), void *rec_data, char *rec_mode); XPA XPACmdNew(char *class, char *name); XPACmd XPACmdAdd(XPA xpa, char *name, char *help, int (*send_callback)(), void *send_data, char *send_mode, int (*rec_callback)(), void *rec_data, char *rec_mode); void XPACmdDel(XPA xpa, XPACmd cmd); XPA XPAInfoNew(char *class, char *name, int (*info_callback)(), void *info_data, char *info_mode); int XPAFree(XPA xpa); void XPAMainLoop(void); int XPAPoll(int msec, int maxreq); void XPAAtExit(void); void XPACleanup(void); Introduction To use the XPA application programming interface, a software developer generally will include the xpa.h definitions file: #include <xpa.h> in the software module that defines or accesses an XPA access point, and then will link against the libxpa.a library: gcc -o foo foo.c libxpa.a XPA has been compiled using both C and C++ compilers. A server program generally defines an XPA access point by calling the XPANew() routine and specifies "send" and/or "receive" callback pro- cedures to be executed by the program when an external process either sends data or commands to this access point or requests data or information from this access point. A program also can define several sub-commands for a single access point by calling XPACmdNew() and XPACmdAdd() instead. Having defined one or more public access points in this way, an XPA server program enters its usual event loop (or uses the standard XPA event loop). SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpaserver(3)

Check Out this Related Man Page

xpainfonew(3)							SAORD Documentation						     xpainfonew(3)

NAME
XPAInfoNew - define an XPA info public access point SYNOPSIS
#include <xpa.h> XPA XPAInfoNew(char *class, char *name, int (*info_callback)(), void *info_data, char *info_mode); DESCRIPTION
[NB: this is an experimental interface, new to XPA 2.0, whose value and best use is evolving.] A program can register interest in receiving a short message about a particular topic from any other process that cares to send such a mes- sage. Neither has to be an XPA server. For example, if a user starts to work with a new image file called new.fits, she might wish to alert interested programs about this new file by sending a short message using xpainfo: xpainfo IMAGEFILE /data/new.fits In this example, each process that has used the XPAInfoNew() call to register interest in messages associated with the identifier IMAGEFILE will have its info_callback() executed with the following calling sequence: int info_cb(void *info_data, void *call_data, char *paramlist) { XPA xpa = (XPA)call_data; } The arguments passed to this routine are equivalent to those sent in the send_callback() routine. The main difference is that there is no buf sent to the info callback: this mechanism is meant for short announcement of messages of interest to many clients. The mode string is of the form: "key1=value1,key2=value2,..." The following keywords are recognized: key value default explanation ------ -------- -------- ----------- acl true/false true enable access control Because no buf is passed to this callback, the usual buf-related keywords are not applicable here. The information sent in the parameter list is arbitrary. However, we envision sending information such as file names or XPA access points from which to collect more data. Note that the xpainfo program and the XPAInfo() routine that cause the info_callback to execute do not wait for the callback to complete before returning. SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpainfonew(3)
Man Page