Hi Kieran, I just change in tcp.h this :
/* * User-settable options (used with setsockopt). */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */ /* Keepalive values */ #define TCP_KEEPDEFAULT 7200000 /* KEEPALIVE timer in miliseconds */ #ifndef TCP_KEEPINTVL #define TCP_KEEPINTVL 75000 /* Time between KEEPALIVE probes in miliseconds */ #endif #ifndef TCP_KEEPCNT #define TCP_KEEPCNT 9 /* Counter for KEEPALIVE probes */ #endif #define TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE probe time */ So, default values are respected, and can be change by lwipopts.h. In changing that, I want to be able to close my tcp connections when the virtual circuit between my client and my server is broken, to avoid waiting a too long time before the client detect the problem (in this protocol, it can have a long time between exchanges, but if the link is "broken", we have to change to another server...). ==================================== Frédéric BERNON HYMATOM SA Chef de projet informatique Microsoft Certified Professional Tél. : +33 (0)4-67-87-61-10 Fax. : +33 (0)4-67-70-85-44 Email : [EMAIL PROTECTED] Web Site : http://www.hymatom.fr ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Kieran Mansley Envoyé : vendredi 16 février 2007 12:10 À : Mailing list for lwIP users Objet : Re: RE : [lwip-users] Questions about LwIP KEEPALIVE... On Thu, 2007-02-15 at 18:29 +0100, Frédéric BERNON wrote: > Ok, I didn't think that was to be RFC compliant... > > But don't you think these values would have to be settable in > lwipopts.h ? Because, even with TCP_KEEPALIVE to 0, the minimum delay > to detect a loss of stream connection is TCP_MAXIDLE (75000*9 = > 675000ms =~ 11.25 min). > > > /* Keepalive values */ > #define TCP_KEEPINTVL 75000 /* Time between > KEEPALIVE probes in miliseconds */ > #define TCP_KEEPCNT 9 /* Counter for > KEEPALIVE probes */ > #define TCP_MAXIDLE TCP_KEEPCNT * TCP_KEEPINTVL /* Maximum KEEPALIVE > probe time */ > > > On a basic XP pc (yes, I know, this is not the "best" reference), > registry values (in > "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\TCPIP\Parameters") > seems to be TCP_KEEPCNT=5 ("TcpMaxDataRetransmissions"), TCP_KEEPINTVL=1000 > ("KeepAliveInterval"), and TCP_KEEPDEFAULT=7200000 ("KeepAliveTime"). > http://support.microsoft.com/kb/314053/en-us > > What do you think about this idea? It's not an option that most people would want to change, and as it's still configurable by those who want to and who understand the implications (by editing tcp.h) I'm happy with the way it is. Out of interest, can I ask what problem you want the KEEPALIVE option to solve? In most cases people see TCP connections surviving short term connectivity breakage as a good thing, but sounds like you want to know (and close connections) if something has gone wrong in the network. Kieran _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
BEGIN:VCARD VERSION:2.1 N:BERNON;Frédéric;;M. FN:Frédéric BERNON ORG:HYMATOM SA;Recherche et Développement TITLE:Chef de projet informatique TEL;WORK;VOICE:04-67-87-61-10 TEL;WORK;FAX:04-67-70-85-44 ADR;WORK;ENCODING=QUOTED-PRINTABLE:;23;Zone Industrielle=0D=0A175 rue de Massacan;VENDARGUES;;34740;FRANCE; LABEL;WORK;ENCODING=QUOTED-PRINTABLE:23=0D=0AZone Industrielle=0D=0A175 rue de Massacan=0D=0AVENDARGUES 34740=0D= =0AFrance URL;WORK:http://www.hymatom.fr ROLE:Chef de projet informatique EMAIL;PREF;INTERNET:[EMAIL PROTECTED] REV:20020404T083210Z END:VCARD
_______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
