Forum Discussion
3 Replies
- Altera_Forum
Honored Contributor
You are correct that there is no fcntl() for LWIP. However there is a handy ioctl which will do what you want FIONBIO.
The syntax is to set non blocking int fred = 1; ioctlsocket(your_socket,FIONBIO,&fred) Simply set fred to 0 for blocking. I've not tested this, so caveat emptor - Altera_Forum
Honored Contributor
Have a look at the web server example design that ships with Nios II. This uses LWIP on uCOS and the HTTP server uses non-blocking IO (for the most part) to send web content back to the client.
- Altera_Forum
Honored Contributor
Thanks for the help.
The FIONBIO with the ioctl worked great for my code.