A tcp server is established in Esp32(station mode). I accept the clients with the code below.
int sock = accept(listen_sock, (struct sockaddr *)&source_addr, &addr_len);
if (sock < 0) {
ESP_LOGE(TAG, "Unable to accept connection: errno %d", errno);
break;
}
When 20 tcp clients send requests to connect at the same time, 9 can connect. But in my system, 1000 clients on the field will have to connect to the esp32 server at the same time.
Although I made "Maximum active TCP Connections
" and "Maximum listening TCP Connections
" to 1000 in Menuconfig
(LWIP->TCP
), the number of connections did not change.
Only when I changed the "Max number of open sockets
" in Menuconfig
, I was able to increase the number of connections.
Esp32 will be connected to the network in "station" mode and create tcp server. The other 1000 esp32 will connect to this as client.
Is it possible?How should I set tcp server, if possible?