tomd socket protocol design specification This documents the intended design of the protocol used by tomd and its client applications. Socket type: We are using PF_LOCAL (protocol family local, IE unix sockets, bound to files) sockets to facilitate communication. The libc implementation is used, see the libc texinfo manual for details. This protocol family was chosen because it offers the best performance locally, and there is no current intention to allow for the daemon to be used remotely. Datagram (udp packets) vs socket streams (byte streams): With byte streams, I would need to delicately encode all of the transitions between commands - however, it is much easier to keep the clients individual, with separate accept calls per connection. with datagrams we would need to encoded the sender, with callback information to send status information on requests back to the client. Weighing these pros and cons, I have gone with datagrams so that the individual packets are easier to work with.