lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Netconn API - receive check withput 1ms delay


From: Simon Goldschmidt
Subject: Re: [lwip-users] Netconn API - receive check withput 1ms delay
Date: Fri, 13 Jul 2012 14:37:03 +0200

"Marco Jakobs" <address@hidden> wrote:
> to receive data from some connections I use the netconn receive timeout to
> have nonblocking reception.
> [..]
> Is there any way doing this in LwIP 1.4.0?

Yes. Instead of using receive timeout, use the callback that can be passed to 
netconn_new_with_callback_*(). This callback function will be called in 
tcpip_thread() when there is new data to be received. For an example how to use 
it, have a look at the socket select implementation.

Using a receive timeout of '0' (effectively calling 'tryfetch' on the mbox) 
seems to be missing, but is less possibly effective than the other solution, 
anyway.

Simon



reply via email to

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