How to establish TCP client's limit in tcp server socket in ESP32?
Posted: Thu Aug 05, 2021 10:41 pm
Hi,
I am using lwip/sockets.h library to create a TCP Server
to handle just one TCP client connection.
In listen() function I set the amount of TCP clients in queue to
to 0.
But, when I initiate the TCP Server, and try to connect with two TCP clients
at the same time with hercules TCP Client, I get both of them connected to my
TCP Server.
How can I handle this event to just get one of them connected?
I am using an freeRTOS task to set up my TCP server, and then
in the while loop, i used the blocking function: accept().
The while loop doesnt have a delay to execute, but even with a delay
it doesnt work the way I want.
Thank you for your time.
I am using lwip/sockets.h library to create a TCP Server
to handle just one TCP client connection.
In listen() function I set the amount of TCP clients in queue to
to 0.
But, when I initiate the TCP Server, and try to connect with two TCP clients
at the same time with hercules TCP Client, I get both of them connected to my
TCP Server.
How can I handle this event to just get one of them connected?
I am using an freeRTOS task to set up my TCP server, and then
in the while loop, i used the blocking function: accept().
The while loop doesnt have a delay to execute, but even with a delay
it doesnt work the way I want.
Thank you for your time.