Subject: Re: fixing send(2) semantics (kern/29750)
To: Jason Thorpe <thorpej@shagadelic.org>
From: Christos Zoulas <christos@zoulas.com>
List: tech-kern
Date: 03/27/2005 03:09:28
On Mar 27, 12:03am, thorpej@shagadelic.org (Jason Thorpe) wrote:
-- Subject: Re: fixing send(2) semantics (kern/29750)

| > Currently, there is no way at all to get send(2) block until it can
| > really send the data. For now, from the application perspective, the
| > only way to go is to get ENOBUFS and sleep between sends to let the
| > interface absorb the data.
| 
| But UDP is "best effort".  You can't guarantee that the data will  
| ever arrive at the other side,  either.

I'd be happy if there was a way for send to block if there was no
space using let's say select. Here we have a situation where the
application has no way of knowing that there is space to send again.
In fact select returns immediately and the sendto call fails with
ENOBUFS. I understand that this is not easy to fix, but saying "use
TCP" or "UDP is unreliable" is all true, but does not address the
issue.

christos