Table of Contents
Implemented by comms.c.
The first protocol is used to send messages over a socket. It simply divides the stream into messages. Each message may contain data and file descriptors.
Each message comprises:
int32: "MSG!"
int32: size of data payload in bytes (not necessarily word-aligned)
int32: number of file descriptors
data payload, padded to word (4 byte) boundary
See the man pages sendmsg(2), recvmsg(2) and cmsg(3) for details about how file descriptors are sent across sockets.