xpaclient(3)

πŸ“¦
version 2.1.20 Β· 2 versions
  • 2.1.20 Β· debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 2.1.20 Β· fedora 43, fedora 44
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ‘‘ NAME πŸ‘‘

okay bestie, welcome to xpaclient β€” section 3 of the manual, the whole client-side saga ✨

XPAClient β€” literally the XPA Client-side Programming Interface, periodt πŸ’…


πŸŽ€ SYNOPSIS πŸŽ€

A description of the XPA client-side programming interface. that's it, that's the synopsis, she's short and she knows it 🫢


🌸 DESCRIPTION 🌸

✨ Introduction to XPA Client Programming ✨

okay so the tea is: sending and receiving data to and from an XPA access point is actually easy. like, no cap, most of the time you literally only need to call the XPAGet() or XPASet() subroutines and you're done πŸ’–

here's the whole squad of functions, verbatim, don't touch a single character:

#include <xpa.h>

int XPAGet(XPA xpa,
    char *template, char *paramlist, char *mode,
    char **bufs, size_t *lens, char **names, char **messages, int n);

int XPASet(XPA xpa,
    char *template, char *paramlist, char *mode,
    char *buf, size_t len, char **names, char **messages, int n);

int XPAInfo(XPA xpa,
    char *template, char *paramlist, char *mode,
    char **names, char **messages, int n);

int XPAAccess(XPA xpa,
    char *template, char *paramlist, char *mode,
    char **names, char **messages, int n);

int XPAGetFd(XPA xpa,
    char *template, char *paramlist, char *mode,
    int *fds, char **names, char **messages, int n);

int XPASetFd(XPA xpa,
    char *template, char *paramlist, char *mode,
    int fd, char **names, char **messages, int n);

XPA XPAOpen(char *mode);

void XPAClose(XPA xpa);

int XPANSLookup(XPA xpa,
    char *template, char *type,
    char ***classes, char ***names, char ***methods, char ***infos);

look at them. iconic. all of them πŸ”₯


🌈 Introduction 🌈

so if you're a software developer wanting to use the XPA application programming interface, the move is: include the xpa.h definitions file πŸ’«

#include <xpa.h>

do that in the software module that defines or accesses an XPA access point, and then link against the libxpa.a library, like:

gcc -o foo foo.c libxpa.a

and ngl, XPA has been compiled using both C and C++ compilers, so whichever one is your main character energy, you're covered 😌


client communication with XPA public access points is generally accomplished using XPAGet() or XPASet() within a program β€” or, if you're feeling command-line-coded, xpaget and xpaset at the command line 🧚

both routines require specification of the name of the access point. that part is not optional, bestie, they need to know who they're talking to 🫢

and if a template is used to specify the access point name β€” like, say, "ds9*" β€” then communication will take place with all servers matching that template. yes, all of them. it's giving group chat, not DM πŸ’€βœ¨


πŸ¦‹ SEE ALSO πŸ¦‹

See xpa(n) for a list of XPA help pages β€” go read her too, she's got the whole map πŸ—ΊοΈπŸ’œ


πŸ’Œ and that's the page!! this was version 2.1.15, dated July 23, 2013 β€” a certified classic from the SAORD Documentation era, still slaying to this day. mwah, go write some clients πŸŽ€πŸ’…πŸŒΈ