I'm developing a HTTP server using the lwIP with only one connection
available at the time (I set MEMP_NUM_TCP_PCB to 1) on the Stellaris
LM3S6965. The program works fine, but I have very long delays between
closing one connection and establishing a second one, but only when the second
one is waiting for connection before first one closes.
The problem appears only
then I try to make a second connection when the first one is still
active. The second connection is waiting for ACK - just as I want it -
until first connection closes. But when the first connection ends, the
second one is still waiting for more or less 2 - 3 seconds. After this 2
- 3 seconds the second connection is establishing.
How to handle this correctly? How to make a second connection establish as soom as the first one closes?
Now when I downloading website from the lwIP HTTP server waitting time for establishing connection is about 3 seconds for each website element.