Perhaps I'm wrong, but current CVS HEAD code show that ioctlsocket(...FIONBIO...) enable just to "non-blocked" on recv/recvfrom/read functions... I also search in the source code, but EINPROGRESS is never used in lwIP. But lwIP is not 100% compatible with BSD features. >Another I am worried about is the fact that having the system off the network, >when I run the client, the connect call answers not immediately. It waits a >few seconds before returning a 103 errno (CONNABORTED). Shouldn´t a >non-blocking connect answer immediately with either an EINPROGRESS or an >error????
Wait to detect a connect error can be long. Another stack I know enable to use an option SO_CONTIMEO to define the max. time to block until a successful connect. It's very unseful at socket layer. I'm interested to work on that, but I don't know when I could. I find this solution better that create a socket, put it in "non-blocking" mode, bind, connect, wait with a "select", and reset to "blocking" mode. ==================================== 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 <http://www.hymatom.fr/> ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de [EMAIL PROTECTED] Envoyé : mercredi 20 juin 2007 15:02 À : [email protected] Objet : [lwip-users] Non-blocking connect Hello lwip users, I would like to ask you some advice on the following issue. I am interested in using non-blocking sockets. I have implemented a daytimetcp client/server application with the client part in an lwip/nucleus system using both blocking and non blocking sockets (in both cases it works allright now thanks to your advice). Nevertheless, I have noticed that in some cases the connect call works as unexpected: When I run the client using non-blocking sockets, I receive the message perfectly, but when the connect is called, the errno received is 0 (OK). Shouldn´t it answer with an EINPROGRESS (115)?? I have had a look at the code in sockets.c and I see no place where the EINPROGRESS code is set into the errno. Might this not be implemented??? Another I am worried about is the fact that having the system off the network, when I run the client, the connect call answers not immediately. It waits a few seconds before returning a 103 errno (CONNABORTED). Shouldn´t a non-blocking connect answer immediately with either an EINPROGRESS or an error???? I have used the ioctl function in order to set my socket to non-blocking. I have done so due to the fact that I assume that the fcntl function does not exist in the lwip sockets layer. Am I right??? Thanks a lot for your help!!!!!!!!! It is always very helpful!!
<<image001.jpg>>
<<image002.jpg>>
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
