[Top][All Lists]

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

Re: [lwip-users] Non Blocking Socket ?

From: David Haas
Subject: Re: [lwip-users] Non Blocking Socket ?
Date: Fri, 02 Sep 2005 21:12:37 -0400
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)

That document is a bit outdated. select() is supported.

Frédéric BERNON wrote:

Hello there,

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

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 

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 ?


============================== 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 ==============================
lwip-users mailing list

reply via email to

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