eclipse-threadx / netxduo

Eclipse ThreadX - NetXDuo is an advanced, industrial-grade TCP/IP network stack designed specifically for deeply embedded real-time and IoT applications
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/netx-duo/index.md
MIT License
230 stars 131 forks source link

NetX BSD fails when select() is passed a timeout #268

Open barney4953 opened 2 months ago

barney4953 commented 2 months ago

I'm using the BSD wrapper described in:

https://learn.microsoft.com/en-us/azure/rtos/netx/appendix-d

The following call works:

status = select(fdmax+1, &readfds, 0, 0, 0);

However, the following call does not:

timeout.tv_sec = 1;
timeout.tv_usec = 0;
status = select(fdmax+1, &readfds, 0, 0, &timeout);

When the timeout is used, it appears recv() always returns an errno of EAGAIN (11).

Any suggestions?