lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [task #7525] Implement TCP listen backlog


From: Frédéric Bernon
Subject: [lwip-devel] [task #7525] Implement TCP listen backlog
Date: Fri, 04 Jan 2008 08:15:13 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

Follow-up Comment #29, task #7525 (project lwip):

>I think an API should be consistent (which is why tcp_accepted(pcb) becomes
empty if the option is off)

Yes, I put an empty define to avoid to have to use TCP_LISTEN_BACKLOG in raw
api samples.

>and the way it was written implies it's not possible to call tcp_accepted if
TCP_LISTEN_BACKLOG=0. 

Ok. Modify the CHANGELOG is you have time, else, I will do it in the weekend.


For the other parts, can I check in the patch ? I also thought to "the listen
backlog (0 = max),": in fact, I don't set it to max (0xff) but to
TCP_DEFAULT_LISTEN_BACKLOG (which is 0xff by default, but could be changed).

Other think: in
http://www.opengroup.org/onlinepubs/007908799/xns/listen.html, we could read :
"If listen() is called with a backlog argument value that is less than 0, the
function sets the length of the socket's listen queue to 0.". So, perhaps we
should add in lwip_listen a check like "if (backlog<0) backlog=0;" and remove
one of the assert, and, in tcp_listen_with_backlog, write :

lpcb->backlog = (backlog ? backlog : 1);

and change the netconn_listen comment.

Thoughts?




 

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/task/?7525>

_______________________________________________
  Message posté via/par Savannah
  http://savannah.nongnu.org/





reply via email to

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