Hello everyone,

I am using lwip for server application on raw API and want max. 1
active tcp connection.
Therefore I set the following defines in liwpopts.h:

#define TCP_LISTEN_BACKLOG              1
#define TCP_DEFAULT_LISTEN_BACKLOG      1

and I implemented my server with:

pcb = tcp_listen_with_backlog(pcb, 1);
tcp_accept(pcb, http_accept);

in http_accept I implement something like

err_t http_ssl_accept(void *arg, struct tcp_pcb *pcb, err_t err)
{
    static someCounter = 0;
    if (someCounter > 0) {
          // why am I here
    }
    someCounter = someCounter + 1;
    // some code
    someCounter =  someCounter - 1;
}


Now I would expect that the line "// why am I here" can never be
reached. But some test showed that this assumption is not true for my
setup. Do I understand something wrong the BACKLOGs?

best
Matthias

_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to