IXP_LISTEN(3)
π IXP_LISTEN(3) π
okay so bestie, welcome to the Library Functions Manual corner of the group chat β this one is literally IXP_LISTEN(3), and it's giving βlet's start a server listening sitchβ energy. no cap. π
πΈ NAME πΈ
ixp_listen, IxpConn β the listen-y function and the connection struct it hands you back. slay. β¨
β¨ SYNOPSIS β¨
#include <ixp.h>
IxpConn *ixp_listen(IxpServer *srv, int fd, void *aux, void (*read)(IxpConn *), void (*close)(IxpConn *));
typedef struct IxpConn IxpConn;
struct IxpConn {
IxpServer* srv;
void* aux; /* Arbitrary pointer, to be used by handlers. */
int fd; /* The file descriptor of the connection. */
void (*read)(IxpConn *);
void (*close)(IxpConn *);
char closed; /* Non-zero when fd has been closed. */
/* Private members */
...
}
π PARAMETERS π
fsβ the file descriptor on which to listen. yes bestie, that's the exact name in this list; the synopsis saysfd, so iykyk. πauxβ a piece of data to store in the connection'sauxmember of theIxpConndata structure. cute little stash spot for your handlers.readβ the function called when the connection has data available to read. it's giving βhey bestie, there's stuff to readβ energy. πcloseβ a cleanup function called when the connection is closed. self-care for your connection. π§
π¦ DESCRIPTION π¦
Starts the server srv listening on fd. The optional read and close callbacks are called with the IxpConn structure for the connection as their sole argument. that's literally it, bestie β main character server-loop behavior, no extra lore. β¨
π RETURN VALUE π
Returns the connection's new IxpConn data structure. so you get a fresh little connection struct back β obsessed. π
π₯ SEE ALSO π₯
go read these next, bestie π«Ά
and that's the whole vibe π β this page comes from the libixp Manual, dated 2012 Dec, and it's literally IXP_LISTEN(3). periodt. π
π¦ where this page comes from
- nixos 26.05: libixp 0-unstable-2022-04-04
- nixpkgs unstable: libixp 0-unstable-2022-04-04
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms