[Top][All Lists]

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

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

From: Jonathan Larmour
Subject: [lwip-devel] [task #7525] Implement TCP listen backlog
Date: Fri, 04 Jan 2008 01:20:05 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.13) Gecko/20060513 Fedora/1.0.8-1.1.fc3.1.legacy Firefox/1.0.8

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

Hi Frederic,

Thanks! I have just one comment which is only the documentation:

I would prefer to document the call to tcp_accepted as a proper part of the
raw API, rather than just for TCP_LISTEN_BACKLOG=1. I think an API should be
consistent (which is why tcp_accepted(pcb) becomes empty if the option is off)
and the way it was written implies it's not possible to call tcp_accepted if

So I suggest the following. Sorry if Savannah messes the formatting:
- struct tcp_pcb *tcp_listen_with_backlog(struct tcp_pcb *pcb, u8_t backlog)

  Same as tcp_listen, but limits the number of outstanding connections in the
listen queue to the value specified by the backlog argument.

  To use it, you need to define TCP_LISTEN_BACKLOG to 1 in lwipopts.h.

-  void tcp_accepted(struct tcp_pcb *pcb)

Inform lwIP that an incoming connection 
has been accepted. This would usually be called from the accept callback.
This allows lwIP to perform housekeeping tasks, such as allowing further
incoming connections to be queued in the listen backlog.

This would also allow us to do further different things in tcp_accepted in
the future if there is ever a need, without changing the API description.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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