Re: what does 'backlog' parameter to listen do?
From: Konstantin Sorokin (spamtrap_at_pluto.sectorb.msk.ru)
Date: 07/20/04
- Next message: halo: "Re: Heavily threaded app gets very little CPU time"
- Previous message: Andrei Voropaev: "Re: what does 'backlog' parameter to listen do?"
- In reply to: Michael Kerrisk: "Re: what does 'backlog' parameter to listen do?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 20 Jul 2004 09:39:29 +0000 (UTC)
Michael Kerrisk <michael.kerrisk.at.gmx.net@nospam.com> wrote:
> On Mon, 19 Jul 2004 19:53:44 +0000 (UTC), Konstantin Sorokin
> <spamtrap@pluto.sectorb.msk.ru> wrote:
>
>>Andrei Voropaev <avorop@mail.ru> wrote:
>>> Hi!
>>>
>>> According to man 2 listen "The backlog parameter defines the maximum
>>> length the queue of pending connections may grow to." But in practice
>>> this parameter seems to mean nothing. At least when I call listen(s, 1)
>>> there still can be hundreds of connections established even though I
>>> didn't call accept for any. Is it because I have syn-cookies enabled? Or
>>> I just misunderstand the man page?
>>>
>>
>>Do you mean ESTABLISHED state from netstat output ? If so then you are
>>wrong, connections can't be in ESTABLISHED state until you call accept(2).
>
> This is wrong. An accept() does not need to be performed in order for
> TCP's three-way handshake to complete (and the two end-points to enter
> the ESTABLISHED state). Try it and see.
Yes, you are right. I've checked this on freebsd box. Thanks for
correction.
-- Konstantin Sorokin
- Next message: halo: "Re: Heavily threaded app gets very little CPU time"
- Previous message: Andrei Voropaev: "Re: what does 'backlog' parameter to listen do?"
- In reply to: Michael Kerrisk: "Re: what does 'backlog' parameter to listen do?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|