[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE : [lwip-users] Non-blocking connect
From: |
Frédéric BERNON |
Subject: |
RE : [lwip-users] Non-blocking connect |
Date: |
Wed, 20 Jun 2007 15:35:54 +0200 |
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@hiddenr
Web Site : http://www.hymatom.fr
====================================
P
Avant
d'imprimer, penser à l'environnement
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!!
Frédéric BERNON.vcf
Description: Frédéric BERNON.vcf
- RE : [lwip-users] Non-blocking connect,
Frédéric BERNON <=