IXP_SENDMSG(3)

NAME

ixp_sendmsg, ixp_recvmsg

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.

ixp_sendmsg writes the data at ImsgR->pos upto ImsgR->end. 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 IfdR and then reads a message of that length (including the 4 byte size specifier) into the buffer at ImsgR->data, so long as the size is less than ImsgR->size.

RETURN VALUE

These functions return the number of bytes read or written, or 0 on error. Errors are stored in ixp_errbuf(3).