[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] netconn_connect, time-out
From: |
Kieran Mansley |
Subject: |
Re: [lwip-users] netconn_connect, time-out |
Date: |
Tue, 26 Oct 2010 11:44:50 +0100 |
On Tue, 2010-10-26 at 12:29 +0200, Sägesser Walter wrote:
> Hi
>
>
>
> If have a TCP client that normally connects to a server on a PC-host.
> If the connectcion is not possible (e.g. line broken), the call
> returns correctly with an error code after about 20 seconds.
>
> Is it easily possible to change this time-out value to, say, 10s? I
> did not find any time-out constants around.
This will be controlled by TCP_SYNMAXRTX and the tcp_backoff array.
TCP_SYNMAXRTX selects how many times we try to retransmit the SYN. Each
retransmission will wait exponentially longer than the next, and it is
the values in tcp_backoff that dictate this - on each subsequent
retransmission the timeout is shifted by the next value in the
tcp_backoff array until we've done it TCP_SYNMAXRTX times. Therefore
setting TCP_SYNMAXRTX to 5 for example will probably do what you want.
Kieran