hi ,
from comment in lwipopt.h is only a flag to enable backloging option to tcp
listening ports ,
not the count of listning as you are saying,
The count of listning queue should be controlled by the second parameter in
the listen socket API,
/* Listen on Socket
* Keep Server on listening mode
*/
if (listen(server_socket, MAXCLIENT) == -1)
/**
* TCP_LISTEN_BACKLOG: Enable the backlog option for tcp listen pcb.
*/
#define TCP_LISTEN_BACKLOG 0 //Default = 0 == off
also the call flow follows to following net conn api
the comment says
/**
* Set a TCP netconn into listen mode
*
* @param conn the tcp netconn to set to listen mode
* @param backlog the listen backlog, only used if TCP_LISTEN_BACKLOG==1
* @return ERR_OK if the netconn was set to listen (UDP and RAW netconns
* don't return any error (yet?))
*/
err_t
netconn_listen_with_backlog(struct netconn *conn, u8_t backlog)
Regards,
Mrutyunjay B Patel
On Tue, Feb 22, 2011 at 5:51 PM, Simon Goldschmidt <[email protected]> wrote:
>
> Mrutyunjay <[email protected]> wrote:
> > if i set TCP_LISTEN_BACKLOG 0 , I can see 1 active connection and 8 in
> > queue , 9th connection is rejected.
>
> 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
> [email protected]
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
_______________________________________________
lwip-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/lwip-users