- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has anyone been able to setup a socket non-blocking with LWIP on uC/OS-II?
I have found that the fcntl() is not supported. My application is using the socket as a control channel that I check every time I go through my application.Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the help.
The FIONBIO with the ioctl worked great for my code.
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page