Page
Library
Module
Module type
Parameter
Class
Class type
Source
SendmsgSourcesendmsg(3) / recvmsg(3) with socket-passing
v0.0.2 — homepage
For detailed semantics of these functions, consult the sendmsg (3) and recvmsg (3) man pages.
send sock ?fd buf off n sends up to n bytes of buf, starting from off, over sock. fs is attached as ancillary data. Returns the number of bytes sent.
recv sock ?fd off n reads up to n bytes into buf, starting from off, from sock. Returns (n, fd), where n is the number of bytes read, and fd is the optional file descriptor attached to the message.
sendv sock ?fd bytesv is the scatter-gather version of send. It sends the contents of all bytes in bytesv, in order. Returns the number of bytes sent.
recvv sock bytesv is the scatter-gather version of recv. Input is gathered into the arrays in bytesv, in order. Returns the total number of bytes read, and an optional file descriptor.