send(2) does not block, send(2) man page wrong?

Stuart Pook Stuart.Pook at infres.enst.fr
Fri Jan 23 08:01:20 PST 2004


> send() for UDP should block if the socket is filled and the interface
> can't drain the data fast enough.

It doesn't (at least I cannot make it block)

> Good question.  There is not feedback loop like in tcp, so handling this
> blocking and releasing would be a little bit harder to do for UDP.

Send(2) indicates that it should do so.

> > I have written a test program,
> > http://www.infres.enst.fr/~pook/send/server.c, that shows that send does
> > not block on FreeBSD.  It does with Linux and Solaris.
> 
> Do you know what the behaviour of Net- and/or OpenBSD is?

NetBSD is the same as FreeBSD.  I have not tested OpenBSD.
MacOS X is similiar to FreeBSD in that send doesn't block, howver
the send does not give an error: the packet is just thrown away.

Stuart


More information about the freebsd-hackers mailing list