mbed OS 5 TCP Socket
Why not use UDP in this case? There won't be any socket opening, you can just listen on a socket on the Mbed board and computers can send data to the port. No problem with abandoning sockets.

Note that we have an example of a multi-threaded HTTP 1.1 webserver here: http-webserver-example if you need some inspiration on building TCP servers on top of Mbed OS.