2008/10/2 Kieran Mansley <address@hidden>
On Thu, 2008-10-02 at 12:12 +0200, Piero 74 wrote:I don't think the sockets API in lwIP supports and sort of user-settable
> Hi kieran
> I'm using BSD socket. All my application is build above sockets.
timeout or asynchronous operation.
i suppose no
I think the TCP stack should eventually give up retransmitting the SYN,
yes, this is my understanding, i found TCP_MAXSYNRTX option
and I hope this error should get propagated back to the application, but
the nature of TCP is such that these timeouts can be of the order of
hours rather than minutes.
HOURS??? my understanding is that SYN packet will be send TCP_MAXSYNRTX times,
using a not simple timeout schema... but i hope that this timeout could be of the order of seconds
and the function netconn_connect returns after this error (i have to d some test) :O|
You could probably fiddle with the SYN
timeout specification to adjust this for your now needs by either
setting the TCP_MAXSYNRTX (defaults to 6)
i hope this is the solution :O|
or adjusting the timeouts
between retransmissions (see the use of the tcp_backoff array in
src/core/tcp.c) but the latter will affect data packets as well as SYN
i saw the code, and it seems more complex... i think is better don't change tcp_backoff array :O(