Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xpacode(7) [debian man page]

xpacode(7)							SAORD Documentation							xpacode(7)

NAME
XPACode - Where to Find Example/Test Code SYNOPSIS
The XPA source code directory contains two test programs, stest.c, and ctest.c that can serve as examples for writing XPA servers and clients, respectively. They also can be used to test various features of XPA. DESCRIPTION
To build the XPA test programs, execute: make All in the XPA source directory to generate the stest and ctest programs. (NB: this should work on all platforms, although we have had prob- lems with unresolved externals on one Sun/Solaris machine, for reasons still unknown.) The stest program can be executed with no arguments to start an XPA server that contains the access points: xpa, xpa1, c_xpa (containing sub-commands cmd1 and cmd2), and i_xpa. You then can use xpaset and xpaget to interact with these access points: cat xpa.c | xpaset xpa # send to xpa cat xpa.c | xpaset "xpa*" # send to xpa and xpa1 xpaget xpa # receive from xpa xpaget xpa* # receive from xpa and xpa1 etc. You also can use ctest to do the same thing, or to iterate: ctest -s -l 100 xpa # send to xpa 100 times ctest -s -l 100 "xpa*" # send to xpa and xpa1 100 times ctest -g -l 100 xpa # receive from xpa 100 times ctest -g -l 100 "xpa*" # receive from xpa and xpa1 100 times More options are available: see the stest.c and ctest.c code itself, which were used extensively to debug XPA. The file test.tcl in the XPA source directory gives examples for using the XPATclInterface. SEE ALSO
See xpa(7) for a list of XPA help pages version 2.1.14 June 7, 2012 xpacode(7)

Check Out this Related 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)
Man Page