IXP_SENDMSG(3)

πŸ“¦ version 0-unstable-2022-04, in nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

ixp_sendmsg, ixp_recvmsg

okay so bestie, welcome to IXP_SENDMSG(3) from the Library Functions Manual 🫢 β€” this is the page for ixp_sendmsg and ixp_recvmsg, and it's literally about reading and writing messages through file descriptors. No cap.

✨ SYNOPSIS ✨

#include <ixp.h>

uint ixp_sendmsg(int fd, IxpMsg *msg);

uint ixp_recvmsg(int fd, IxpMsg *msg);

πŸ¦‹ DESCRIPTION πŸ¦‹

These functions read and write messages to and from the given file descriptors. That's the whole assignment. πŸ’…

  • ixp_sendmsg β€” writes the data at msg->pos upto msg->end. bestie, if the call returns non-zero, all data is assured to have been written. πŸ”₯
  • ixp_recvmsg β€” first reads a 32 bit, little-endian length from fd, and then reads a message of that length (including the 4 byte size specifier) into the buffer at msg->data, so long as the size is less than msg->size. It's giving "read the length, then read the whole message" energy, and honestly? Iconic. πŸŽ€

🌸 RETURN VALUE 🌸

These functions return the number of bytes read or written, or 0 on error. Errors are stored in ixp_errbuf(3). So if you get 0, don't just stare at it β€” check ixp_errbuf(3), bestie. 😭


that's the whole page, fr fr β€” brought to you by the libixp Manual, 2012 Dec. periodt. πŸ’œβœ¨

πŸ“¦ where this page comes from