Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jan 2004 17:00:43 +0100
From:      Stuart Pook <Stuart.Pook@infres.enst.fr>
To:        Andre Oppermann <andre@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: send(2) does not block, send(2) man page wrong? 
Message-ID:  <E1Ak3jf-0006tv-00@roo>
In-Reply-To: Message from andre@freebsd.org of Fri, 23 Jan 2004 16:50:33 %2B0100.	<401142C9.70502@freebsd.org> 

next in thread | previous in thread | raw e-mail | index | archive | help
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Ak3jf-0006tv-00>