Re: What does the -w flag do in UDP mode?
On Fri, 2 Jul 2004, Mitch Kutzko wrote:
> >Email: nmarz --at-- entropic.com
> >
> > What does the -w flag do in UDP mode? I didn't quite understand what this
> does or the reason for needing to set it from the documentation.
It does the same thing that for TCP : it sets the socket buffer size.
setsockopt(SO_SNDBUF,...) on the transmitter and
setsockopt(SO_RCVBUF,...) on the receiver.
See man setsockopt, socket, etc.
Since UDP does not need to hold all un-acknowleged packets on the
receiver (no reliability), small buffers will not prevent you to send
at the rate you want, from a protocol point of view. The purpose of
UDP socket buffers is only to... buffer (damper) data, in order to
batch operations on the hosts and maybe provide higher
performance/less CPU/less packet loss/whatever this way. But you
guessed it, it has not the same importance as for TCP.
My 2 cents: the -w option should be called
socket buffer size (TCP window)
instead of:
TCP window size (socket buffer size)
:-)
PS Mitch: thanks for fixing the subject in those forwarded messages:
now I don't anymore throw them away without even reading them.