UNIX IPC Datagram Reliability under 4.2BSD

mccallum at opus.UUCP mccallum at opus.UUCP
Thu Feb 2 01:36:01 AEST 1984


AF_UNIX datagrams under 4.2 are definitely NOT reliable.  They
are effectively reliable if the reading process receives the datagrams
in a reasonable time, but if the reader is slow and the sender keeps
sending then datagrams are dropped.  This can be demonstrated by
setting up a receiving process that receives a message then sleeps
a second and having a sending process that keeps sending.  If part of
the data is a sequence number, the receiver will see that some messages
have been dropped.  The sender does not see an error and never blocks
on the send.

Most applications that would use datagrams don't need strict reliability
and should be using an application dependent protocol to guarantee
reliablity.

There are other problems with the 4.2 AF_UNIX datagrams.  Has anyone tried
to connect a datagram socket and then use it?

		Doug McCallum
		NBI, Inc.
		{allegra,ucbvax,hao}!nbires!mccallum



More information about the Comp.unix.wizards mailing list