[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] tcp listen backlog
From: |
Matthias Dübon |
Subject: |
[lwip-users] tcp listen backlog |
Date: |
Wed, 3 Dec 2014 09:26:02 +0100 |
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] tcp listen backlog,
Matthias Dübon <=