Switched to autotools
[tlb/tomd.git] / src / PROTOCOL_DESIGN
CommitLineData
bd11173e
TB
1tomd socket protocol design specification
2
3This documents the intended design of the protocol used by tomd and
4its client applications.
5
6Socket type:
7We are using PF_LOCAL (protocol family local, IE unix sockets, bound
8to files) sockets to facilitate communication. The libc implementation
9is used, see the libc texinfo manual for details. This protocol family
10was chosen because it offers the best performance locally, and there
11is no current intention to allow for the daemon to be used remotely.
12
13Datagram (udp packets) vs socket streams (byte streams):
14With byte streams, I would need to delicately encode all of the
15transitions between commands - however, it is much easier to keep the
16clients individual, with separate accept calls per connection. with
17datagrams we would need to encoded the sender, with callback
18information to send status information on requests back to the
19client. Weighing these pros and cons, I have gone with datagrams so
20that the individual packets are easier to work with.