Setting TCP_LISTEN_BACKLOG==0 means "disabled". In this case, backlog is limited by the number of PCBs.
> if i set TCP_LISTEN_BACKLOG 1 , I can see 1 active connection and 1 in
> queue.
In lwIP, the listen backlog is the number of incoming connections queued for accept(), meaning once you accepted one connection, another one is free to be queued for the next accept call. Open client connections previously accepted do not count in here.
SWimon
--
GMX DSL Doppel-Flat ab 19,99 Euro/mtl.! Jetzt mit
gratis Handy-Flat! http://portal.gmx.net/de/go/dsl
_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users
Obviously zero is not a proper value. Everytime, one client will wait.
If you want only one client, you have to close the listen socket after
accepting a connection and then reopen it. Ugly way, has anyone a
better idea?
Regards
Martin
Where was I saying that? I only said that if this feature is turned off, there's another limit somewhere else (the amount of available memory in this case).
> The count of listning queue should be controlled by the second parameter
> in
> the listen socket API,
Did I say anything that contrasts to this?
Simon
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
Please file a bug. We are ignoring it if it's zero. We should be
ignoring it if it's negative. I'm not sure how complex this will be
internally to fix.
However, as others have pointed out, this shouldn't stop you restricting
the number of accepted connections to 1. You just won't be able to
restrict it to zero.
Kieran
I'm not sure our backlog can provide what he wants. From reading his mails, he wants to limit a listening port to allow only 1 connection at a time, thus denying new connections until the first one is closed.
However, our backlog implementation limits the accept queue, thus allowing unlimited simultaneous connections if the application accepts them fast enough. He would thus end up with 1 active connection and 1 connection queued in the accept-queue.
I'm not too familiar with other OSes, but I think we're pretty much standard here?
Simon
--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone
_______________________________________________
Yes, that's what I was trying to get at. We don't at the moment support
limiting to 1 active and 0 queued, but 1 active and 1 queued should be
possible. The original email seemed to suggest he couldn't even get it
to limit at that.
Kieran