lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Terminating a blocked lwip_recv


From: Kieran Mansley
Subject: Re: [lwip-users] Terminating a blocked lwip_recv
Date: Wed, 7 Jul 2010 12:01:02 +0100

On 6 Jul 2010, at 17:46, Farid Mahini wrote:

> How can I terminate a blocking socket (lwip_rec and also lwip_accept) ? I am 
> running within FreeRTOS on AVR32.

There is no safe way to do this on lwIP.  It would involve using the socket 
from two different threads and that is not supported.  The best approach is to 
set a flag when you want the thread to stop reading, and a timeout on your 
lwip_recv() operation.  When lwip_recv() times out check the flag to see if you 
should continue blocking, if so call lwip_recv() again, if not close the 
connection.

Kieran


reply via email to

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