TCP Server connecting to adafruit ESP32

Hello,

it seems you use some old version of MbedOS (older than 5.12), the TCPServer.h is obsolete and all necessary things (Server/client) are under under the TCPSocket in the MbedOS 5.12 - MbedOS 6.8 (latest).

Anyway you need to read Mbed documentation about Socket

So in your loop you only again and again set the number of connections.

The old TCPServer was something like is here
About current TCP Server you can read in topics below.

BR, Jan