lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Non Blocking Socket ?


From: Frédéric BERNON
Subject: [lwip-users] Non Blocking Socket ?
Date: Fri, 2 Sep 2005 16:14:13 +0200

Hello there,

I try to use a SOCK_DGRAM socket in a non-blocking mode. I would like to have a 
code like this :

While(True)
if (sendto( socket, ....)>=0)
 { if (recvfrom( socket...)>=0)
    { do job
    }
 }

My problem is that the recvfrom is block the process. So, if the peer never 
answer (or if the packet is lost), the recvfrom never returns and my process is 
dead. I have try SO_RCVTIMEO option, but it seems it is not support by lwIP. I 
read in the lwIP.pdf document (Adam Dunkels, Feb 20, 2001, chapiter 17) that 
"select" is not supported.

So, How can I do to do a code like this, with a timeout on recvfrom ?

Note I use a lwIP 1.1.0 on a multithread OS. Perhaps a bug in our sys_arch ?

Thanks


============================== 
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 
============================== 

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


reply via email to

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