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: Simon Goldschmidt
Subject: [lwip-devel] [task #7525] Implement TCP listen backlog
Date: Mon, 17 Dec 2007 07:30:56 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11

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

> Isn't it possible to use the same fields that for SO_RCVBUF ?

I thought of that and it would make sense, but it would have made the patch
more complex, so I didn't add it there.

> Yes, but your solution is less "lightweight" than do the process in
accept_callback.

Doing it in accept_callback is definitively wrong, because for the client,
connect succeeds but a send after that fails!

> why not just integrate this support directly into the raw TCP functions,
with the backlog and current count of waiters as part of the PCB? The netconn
accept function can then directly change the count of waiters in the PCB as it
accepts them.

That was my idea at first also, but we have a problem there: the counter
would be modified from tcpip_thread as well as in netconn_accept (after
receiving a new connection from acceptmbox). So either access to this counter
would have to be locked (in tcp_in.c also, which is bad) or we would need a
new function in api_msg.c do_accepted which would modify the counter in the
context of tcpip_thread (more code).

On the other hand, the accept_allowed callback also allows usage from raw
applications. A listen backlog is not really applicable for them, since they
can only allow or disallow new connections but no hold connections in a queue
(because of the callback design) - but with the current code, this is done at
the wrong time (after the new connection is already established).

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Nachricht geschickt von/durch Savannah
  http://savannah.nongnu.org/





reply via email to

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