Search found 3 matches

by liyafe1997
Mon May 19, 2025 1:29 pm
Forum: General Discussion
Topic: Is it FD_SETSIZE hardcoded to 64?
Replies: 1
Views: 124

Is it FD_SETSIZE hardcoded to 64?

I want to have socket connection more than 64.
If I set CONFIG_LWIP_MAX_SOCKETS > 64 in the sdkconfig, I got


v5.4.1/esp-idf/components/lwip/port/esp32xx/vfs_lwip.c:23:1: error: static assertion failed: "MAX_FDS < CONFIG_LWIP_MAX_SOCKETS"
23 | _Static_assert(MAX_FDS >= CONFIG_LWIP_MAX_SOCKETS ...
by liyafe1997
Tue Oct 29, 2024 8:05 am
Forum: ESP-IDF
Topic: close() does not really release the fd which is created by socket()
Replies: 2
Views: 912

Re: close() does not really release the fd which is created by socket()


Do not vTaskDelete() any other task than the current one (vTaskDelete(NULL);).

If you have to, try only closing the socket from the other task, and have the socket-reading task check the value returned from recvfrom() for 0/-1 and then delete itself after releasing any ressources it may hold ...
by liyafe1997
Mon Oct 28, 2024 2:09 pm
Forum: ESP-IDF
Topic: close() does not really release the fd which is created by socket()
Replies: 2
Views: 912

close() does not really release the fd which is created by socket()

I use socket(addrFamily, SOCK_DGRAM, ipProtocol); or socket(addrFamily, SOCK_STREAM, ipProtocol); to create UDP/TCP socket, then bind(), then recv()/recvfrom() in a FreeRTOS task, then vTaskDelete(the recv task) and close() it in another FreeRTOS task, whatever it is a TCP or UDP, seems the fd seems ...

Go to advanced search