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

2004-01-27 Thread Jan Grant
On Mon, 26 Jan 2004, Steve Watt wrote: [EMAIL PROTECTED] wrote: do what ping does (ping -f) when you get an ENOBUFS do a usleep for 1 mSec. and then send it again. So how, exactly, do you actually sleep for 1mSec? I recently did some experiments using nanosleep(), and it seems that the

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

2004-01-26 Thread Stuart Pook
On 23 Jan 2004, Don Lewis wrote: the send does not give an error: the packet is just thrown away. Which is the same result as you would get if the bottleneck is just one network hop away instead of at the local NIC. But it isn't. I'm broadcasting onto the local network. With Linux and

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

2004-01-26 Thread Julian Elischer
do what ping does (ping -f) when you get an ENOBUFS do a usleep for 1 mSec. and then send it again. On Mon, 26 Jan 2004, Stuart Pook wrote: On 23 Jan 2004, Don Lewis wrote: the send does not give an error: the packet is just thrown away. Which is the same result as you would get if

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

2004-01-26 Thread Luigi Rizzo
On Mon, Jan 26, 2004 at 10:53:54AM -0800, Julian Elischer wrote: ... On Mon, 26 Jan 2004, Stuart Pook wrote: On 23 Jan 2004, Don Lewis wrote: the send does not give an error: the packet is just thrown away. Which is the same result as you would get if the bottleneck is just one

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

2004-01-26 Thread Steve Watt
[EMAIL PROTECTED] wrote: do what ping does (ping -f) when you get an ENOBUFS do a usleep for 1 mSec. and then send it again. So how, exactly, do you actually sleep for 1mSec? I recently did some experiments using nanosleep(), and it seems that the minimum sleep time is 2 / HZ. I.e. ask for

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

2004-01-26 Thread Julian Elischer
On Mon, 26 Jan 2004, Steve Watt wrote: [EMAIL PROTECTED] wrote: do what ping does (ping -f) when you get an ENOBUFS do a usleep for 1 mSec. and then send it again. you are correct, but I just meant that it requested to sleep 1mSec, not that the sleep actually WAS 1mSec. Making udp sockets

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

2004-01-23 Thread Stuart Pook
The documentation for send(2) says If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) call may be used to determine when it

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

2004-01-23 Thread Andre Oppermann
Stuart Pook wrote: The documentation for send(2) says If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) call may be used to

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

2004-01-23 Thread Stuart Pook
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.

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

2004-01-23 Thread Ruslan Ermilov
On Fri, Jan 23, 2004 at 04:25:07PM +0100, Stuart Pook wrote: The documentation for send(2) says If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks, unless the socket has been placed in non-blocking I/O mode.

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

2004-01-23 Thread Andre Oppermann
Stuart Pook wrote: 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) This stuff is rather complex. A send() on a UDP socket processes right down to the if_output. If that fails because the ifqueue

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

2004-01-23 Thread Luigi Rizzo
On Fri, Jan 23, 2004 at 06:09:20PM +0100, Andre Oppermann wrote: ... 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) This stuff is rather complex. A send() on a UDP socket processes

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

2004-01-23 Thread Julian Elischer
On Fri, 23 Jan 2004, Andre Oppermann wrote: Stuart Pook wrote: 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) This stuff is rather complex. A send() on a UDP socket processes right

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

2004-01-23 Thread Don Lewis
On 23 Jan, Stuart Pook wrote: 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

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

2004-01-20 Thread Stuart Pook
The documentation for send(2) says If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) call may be used to determine when it

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

2004-01-20 Thread Justin Walker
On Monday, January 19, 2004, at 08:53 AM, Stuart Pook wrote: The documentation for send(2) says If no messages space is available at the socket to hold the message to be transmitted, then send() normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) call