lwip-users
[Top][All Lists]
Advanced

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

RE : RE : [lwip-users] Non-blocking connect


From: Frédéric BERNON
Subject: RE : RE : [lwip-users] Non-blocking connect
Date: Thu, 21 Jun 2007 09:22:21 +0200

Yes, you're right. I think the "good" thing to do should be to improve the stack if your really want to get such sockets. Perhaps open a "task" on http://savannah.nongnu.org/task/?group=lwip, named something like "Implement non-blocking operations at socket layer"... But I don't know when someone could start to work on that...
 
 
====================================
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 : address@hiddenr
Web Site : http://www.hymatom.fr
====================================
P Avant d'imprimer, penser à l'environnement
 
-----Message d'origine-----
De : address@hidden [mailto:address@hidden De la part de address@hidden
Envoyé : jeudi 21 juin 2007 08:51
À : Mailing list for lwIP users
Objet : RE : [lwip-users] Non-blocking connect


Thank you very much!

I searched the code too and found no EINPROGRESS used.

Anyway, is there any other option to set a socket as non-blocking? I have seen the fcntl function in some books but this is not implemented under lwip. That´s why I have used ioctl, because I think it is the only option in lwip. Am I right??

Regards,

Borja.



Frédéric BERNON <address@hidden>
Enviado por: address@hidden

20/06/2007 15:35

Por favor, responda a
Mailing list for lwIP users <address@hidden>

Para
"Mailing list for lwIP users" <address@hidden>
cc
Asunto
RE : [lwip-users] Non-blocking connect





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 : address@hidden

Web Site :
http://www.hymatom.fr
====================================

P Avant d'imprimer, penser à l'environnement
 
-----Message d'origine-----
De :
address@hidden [mailto:address@hidden De la part de address@hidden
Envoyé :
mercredi 20 juin 2007 15:02
À :
address@hidden
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!!
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users

Attachment: Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf


reply via email to

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