xpacode(7)
β¨ NAME β¨
XPACode β where to find example/test code π (yes bestie, it's literally in the title, we're off to a strong start)
πΈ SYNOPSIS πΈ
okay so the XPA source code directory has two test programs in it: stest.c and ctest.c. They're your little demo besties β stest.c shows you how to write an XPA server, and ctest.c shows you how to write an XPA client. They also double as a vibe check for various features of XPA. π¦
π DESCRIPTION π
π Building the test programs
To build the XPA test programs, you literally just run this:
make All
...in the XPA source directory, and boom π₯ you get the stest and ctest programs generated. (NB: this should work on all platforms, although we have had problems with unresolved externals on one Sun/Solaris machine, for reasons still unknown. π not the mystery Solaris drama, we still don't know why, and honestly? we may never.)
π Playing with stest
Run stest with no arguments and it starts up an XPA server containing these access points:
xpaxpa1c_xpaβ which itself contains the sub-commandscmd1andcmd2i_xpa
Then you get to hang out with them using xpaset and xpaget, like:
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 can also use ctest to do the exact same thing, or to iterate, which is where it gets fun:
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. π«Ά no cap, those files carried the whole debugging arc.
π§ The Tcl side of things
The file test.tcl in the XPA source directory gives examples for using the XPATclInterface. go look, it's cute π
π SEE ALSO π
See xpa(n) for a list of XPA help pages π
k that's the whole page bestie, you're officially caught up πβ¨ this was version 2.1.15, dated July 23, 2013, from SAORD Documentation, and it's filed under xpacode(7) β slay, periodt π
π
π¦ where this page comes from
- debian bookworm: libxpa-dev 2.1.20-1 Β· MIT
- debian trixie: libxpa-dev 2.1.20-3 Β· MIT
- ubuntu jammy: libxpa-dev 2.1.20-1 Β· MIT
- ubuntu noble: libxpa-dev 2.1.20-1build1 Β· MIT
- ubuntu questing: libxpa-dev 2.1.20-3
- ubuntu resolute: libxpa-dev 2.1.20-3build1 Β· MIT
- ubuntu stonking: libxpa-dev 2.1.20-3build1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms