lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Listen/Accept lwip 2.0.0


From: Joel Cunningham
Subject: Re: [lwip-users] Listen/Accept lwip 2.0.0
Date: Thu, 04 May 2017 10:56:09 -0500

Do you have TCP_LISTEN_BACKLOG enabled in your port?

Also keep in mind, the backlog only limits connections that have not been 
accepted.  Once accepted by your application, the connections are not part of 
the backlog.  If your goal is to support 4 simultaneous connections at once 
(with no pending connections), you need to close the listener once the server 
has 4 connections.

Joel

> On May 4, 2017, at 9:44 AM, Marcelo V <address@hidden> wrote:
> 
> Hello,
> 
> I am implementing a small web-server using lwip 2.0.0 and it seems that the 
> TCP stack is accepting more connections than set by my listen call.
> In my use-case I have an webpage with HTML requesting many external resources 
> to be loaded. However, I want to only serve max of 4 requests simultaneously 
> (4 sessions) and “keep-alive” is disable (replies 200 OK with "connection: 
> close”).
> 
> However, as soon as my code replies the very first accepted connection then I 
> see my web browser issuing 8~10 GET’s even before I call accept again. 
> Wireshark shows those 8~10 connections each with their port number and the 
> entire GET had flown to the server.
> 
> It seems that the number of connections provided by the listen were ignored 
> and TCP is accepting and buffering all requests.
> 
> I browsed the bug track and I did not find anything being reported.
> 
> How can I prevent this?
> 
> Thanks in advance,
> Marcelo
> 
> 
> 
> 
> 
> _______________________________________________
> lwip-users mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-users




reply via email to

[Prev in Thread] Current Thread [Next in Thread]