lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Maximum retransmission value


From: address@hidden
Subject: Re: [lwip-users] Maximum retransmission value
Date: Fri, 24 Jul 2009 20:16:35 +0200
User-agent: Thunderbird 2.0.0.22 (Macintosh/20090605)

In your situation, the portable way would be to use non-blocking connect and then use select to implement a timeout. However, the lwIP socket API does not support non-blocking connect, yet (but I think there's a patch for that available on savannah).

You can still implement a timeout using the raw API though: even while connecting, the poll callback function of the pcb will be called. You can implement a timeout there.

Simon


Alain Mouette wrote:
Hi Simon,

I also need to do the same (it is in my todo list).

The reaso to do so is quite reasonable: I am connecting to a server over GPRS, I have a list of servers and I try all of them sequentialy twice. The probelm is that each SYN is billed and thus excesses have to be avoided.

Lont-time experience in *this situation* shows that if the server does not answer after a few seconds, it is not worth waiting any further. Usualy a second atempt (which will use a different return port) will work.

Thanks,
Alain

address@hidden escreveu:
Changing these defines is generally not a good idea, unless you have detailed knowledge of what they do in the tcp stack. You might risk unstable connections on networks which are not 100% safe against packet loss, and you also might risk interoperability with other network stacks/devices.

In general, it is better to design your communication protocol in a way to detect a timeout instead of changing the timeout at TCP level, where you change it for all connections - although you might only need the timeout for a dedicated control connection (or something like that).

Simon


PELISSIER Christophe wrote:
Hi,
I want to speed up the connection error detection of my application. Is decreasing the TCP_MAXRTX and TCP_SYNMAXRTX value a good way to be aware rapidely that a connection has been lost. Is there any risk to decrease TCP_MAXRTX from 12 (default value in my lwipopts.h) to 6 and TCP_SYNMAXRTX from 6 to 3? What can be the side effect that i must take care of? Thanks for your support. Regards,
Christophe
------------------------------------------------------------------------

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users




_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users






reply via email to

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