Skip to main content
Jens1
Visitor II
Jan 22, 2020 7:07 PM UTC
Question

Using Select() to get non blocking Tcp recv()?

Anyone already used select() function together with a timeout? I like only to call the Tcp recv() function when data are in the receive buffer.

I have a Nucleo F429Zi.

With best regards,

Jens

This topic has been closed for replies.

1 reply

Piranha
Principal III
Jan 25, 2020 9:04 PM UTC

Are you talking about lwIP stack?

Socket API is built on top of Netconn and is the worst one. Netconn is better, but it seems that it has the same limitations regarding timeouts. Of course one can use 1 ms timeout, but... The most flexible and effective option is to use RAW API with callbacks and just forget those old-school broken designs with select() and whatnot.