due to RAM limitations, it is needed to limit max. amount of TCP connections. There ist a hard coded constant RTCSCFG_TCP_MAX_CONNECTIONS to configure the total amount of TCP connection count. However, if simultaneous requests (from external clients) to a special port have exhausted these number, no other TCP service (server on another port) can service requests.
The requirement is, to provide TCP service on one port and limit the service on another TCP port to avoid RAM underflow. I was wondering, if there is any solution for it. I use MQX 18.104.22.168 running on MK60DN512.
I've tested the suggestion Re: how to see the max connection number to a TCP/IP port
However, it is not clear for me, to shutdown
a) the socket handler returned by RTCS_selectall() or
b) to shutdown the socket returned by listen() ?
Idea a) does not work for me, because TCP_Clone_tcb() and RTCS_mem_alloc_zero() is called before RTCS_selectall() and MQX memory is not released until the external client shutdown by himself.
Idea b) does not work for me too, because furher client request are also out of work if all other requests are closed before (which is understandable, indeed).