Quote:> Everything I've read has made it quite clear that UDP does not provide
> reliable data delivery. What hasn't been very clear to me is if Unix
> domain datagram sockets are also unreliable?
> Since everything happens on the same computer with a unix domain socket,
> does the kernel guaranty to deliver the message?
For BSD-derived kernels, if the sendto() returns OK, then the answer
is yes. (I am assuming the kernel does not crash between the sendto()
and the receiver's recvfrom(), as that's a different story.) Pages
263-265 of "TCP/IP Illustrated, Volume 3" give all the details. With
a Unix domain datagram socket there is no loss on the network (since
there is no network) and the case of the receiver's socket receive
buffer being full is handled by returning an error to the sender.
This means, of course, that the sender must handle this error, wait,
and try to send again.