* listen and backlog parameter - is it supposed to work?
@ 2005-03-16 14:50 Andrei A. Voropaev
0 siblings, 0 replies; only message in thread
From: Andrei A. Voropaev @ 2005-03-16 14:50 UTC (permalink / raw)
To: linux-kernel
Hello!
Recently I stumbled across interesting "feature" of listen and backlog
parameter for it. Stevens book mentions that this parameter shall
specify maximum count of ESTABLISHED connections that will wait in the
queue for accept to be picked up. It also says that for linux backlog =
0 in reality means that there'll be 3 ready connection waiting. The rest
of SYNs shall be dropped silently untill accept harvests the established
connection(s).
I've tried it with linux and sure enough it didn't work as described. In
fact, it works very strangely. In my test program I do listen(sock, 0)
and then go to sleep for long time. Then I try to connect to the port.
First 3 connections succeed as expected. The fourth one times-out (I
used time out 4 seconds), also as expected. But the fifth one again
succeeds. And all subsequent ones seemingly random succeed and time-out.
So in my test out of 30 connections I got between 10 and 20 connections
established.
It does not look like a proper behaviour, but maybe I'm missing
something? I'm using vanila kernel and I tried it both with 2.6 and 2.4.
Not that it's very important, but I'm really curious why is it so.
Thank you
Andrei Voropaev
PS. I'm not on the list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-03-16 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-16 14:50 listen and backlog parameter - is it supposed to work? Andrei A. Voropaev
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome