|
From: | Chen |
Subject: | [lwip-users] Re: lwip-users Digest, Vol 78, Issue 12 |
Date: | Tue, 09 Feb 2010 12:04:03 -0500 |
Incoming connections will be sent a RST. However, this doesn't limit
concurrent connections by default: it has been introduced to limit the
outstanding-connection-queue for netconn- or socket-API. Normally, for
the raw API, there is no such thing (that lies in the nature of the
single-threaded callback mechanism). However, when using this feature,
you have to call tcp_accepted from your appect function to decrease this
counter. If you defer calling tcp_accepted and call it later, you can
implement a concurrent-connection limitation.
When using the socket- or netconn-API, the stack does this for you.
Suppose you have one thread calling accept/recv/send/close in a loop and
set the backlog to 1 then you will only have one active and one pending
connection at a time and all other SYNs coming in will be RST'ed.
Simon
[Prev in Thread] | Current Thread | [Next in Thread] |