Are unix domain socket datagrams reliable?

Are unix domain socket datagrams reliable?

Post by David Kantowit » Wed, 11 Feb 1998 04:00:00



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?

Thanks,
David

 
 
 

Are unix domain socket datagrams reliable?

Post by Kurt J. Lanz » Wed, 11 Feb 1998 04:00:00



> 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?

I'm not sure exactly what you are asking. TCP sockets are "reliable" in
the sense that, once your program has openned a TCP socket and connected
to a socket on another host, the TCP software will either deliver any
data you send, or tell you it failed.
--
Kurt J. Lanza


 
 
 

Are unix domain socket datagrams reliable?

Post by W. Richard Steve » Wed, 11 Feb 1998 04:00:00


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.

        Rich Stevens

 
 
 

1. UNIX domain datagram sockets

I am just starting to learn about sockets programming using the book:

        Adventures in UNIX Network Applications Programmimg - WILEY

I am looking at the UNIX domain to start with.

The connectionless datagram examples work fine on SUNs but not under Linux.
connect() returns INVALID PARAMETER as does recv(). I also noticed that
recv() does not block.

Can any one tell me if Are datagram sockets fully supported in the
UNIX domain under linux?

Thanks for any help

John

2. Why can't we just all be friends?

3. UNIX Domain Datagram Sockets - Receive Queue Size?

4. Changing source address of packets

5. UNIX domain Socket Datagram question

6. Squid config file help

7. UNIX Domain Datagram Socket:Receive Queue Size?

8. Bare-bones file server?

9. DATAGRAM sockets in the UNIX DOMAIN.

10. Not enough queuing of datagrams on a unix domain socket

11. Datagram sockets in Unix Domain?

12. credentials from Unix-domain datagram socket?