Hi Mateusz, I just terminate new patch about netconn_recv to implement SO_RCVTIMO (previous give problems to others developers), but, it will only work on UDP in a first time (and, I suppose you use TCP). About KeepAlives, I have to change Keepalive feature to enable to change value per socket, but in a first time, it's not - yet - possible.
Wait and see... ==================================== 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 Mateusz Plocinski Envoyé : jeudi 8 mars 2007 15:14 À : Mailing list for lwIP users Objet : Re: [lwip-users] netconn_recv blocking forever Hi, thanks for fast answer. Of course I could do as you said but my problem is that thread is blocked in netconn_recv so I cant do anything while waiting for data. I dont want to use raw api or to go deeper into the stack (it would take me too much time... and my whole application is written using netconn socket api). Is it possible to change netconn_recv to wait for data for some time and then return after timeout? It would solve my problem. I'm trying to work this problem around for some time but I'm affraid to change anything in the core of lwip (too many things which are difficult to understand, too few time for that...). Mateusz Plocinski 2007/3/8, Kieran Mansley <[EMAIL PROTECTED]>: > On Thu, 2007-03-08 at 14:27 +0100, Mateusz Plocinski wrote: > > Hi, > > I'm using an ARM7 FreeRTOS port of lwip. I'm trying to implement a > > thread which waits for data from PC using netconn_recv. Everything > > works fine in most situations (for week or longer without any > > problems), but when I disconnect network cable or PC simply hangs up > > without closing a connection, my lwip socket thread still sits in > > netconn_recv function. > > > > Is there any way to check if connection isnt dead while thread is > > blocked in netconn_recv? I need to know in few seconds if I should > > close connection because I need to quickly restart connection to my > > ARM hardware (and I have only on thread so I cant open more sockets > > to wait for connection). > > I think the short answer to this is "No". There are all sorts of > network faults (e.g. unplugged cables, or server dieing without > closing connections, etc) that aren't detectable by one end of the > connection. > > You could try using the TCP KEEPALIVE support, but that takes a > minimum of two hours to report a connection as broken, rather than a > few seconds, because TCP is designed to survive short outages of a few > seconds. > > You could modify your application and server so that they (for example > once every 10 seconds) send each other a "are you still there" > message, and reply "yes I'm still here". Then, if you don't receive > the reply you can guess that something has gone wrong. > > Kieran > > > > _______________________________________________ > lwip-users mailing list > [email protected] > http://lists.nongnu.org/mailman/listinfo/lwip-users > _______________________________________________ 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
