Add "max-clients" property to limit number of connecting clients in GstRTSPServer
Submitted by Sebastian Rasmussen
GstRTSPServer currently has a way of limiting the number of work being done in parallel by setting the maximum number of threads on the GstRTSPThreadPool being used. But there is no way to limit the number of connecting clients (some of which may later be accepted, and some be denied e.g. by the ->prepare() virtual function denying access). If there is no limit then some resource may be depleted, e.g. the number of file descriptors that may be open in the process running GstRTSPServer.
The proposed patch adds a property on GstRTSPServer exposing a max-clients limit. Once this limit has been reached the server will simply disconnect any connecting client without letting it send its request and without sending any RTSP response.
I'm of course available for further discussions concerning this patch.