[Live-devel] Retrieving stats for ProxyServerMediaSession

Ross Finlayson finlayson at live555.com
Mon Nov 6 20:23:22 PST 2023



> On Nov 6, 2023, at 6:44 AM, Andy Hawkins <Andy.Hawkins at uniguest.com> wrote:
> 
> Hi,
> 
> Thanks for the pointer, that was useful in extracting the incoming data for the proxied RTSP connection.
> 
> Is there any way to iterate over all of the clients of an RTSP proxy

Yes, first download the latest version (2023.11.07) of the “LIVE555 Streaming Media” code, which makes “fClientSessions” ‘protected’ rather than ‘private’.  Then, in your subclass of “RTSPServer”, you can do something like the following:

	HashTable::Iterator* iter = HashTable::Iterator::create(*fClientSessions);
	RTSPServer::RTSPClientSession* clientSession;
	char const* key; // dummy

	while ((clientSession = (RTSPServer::RTSPClientSession*)(iter->next(key))) != NULL) {
		// do something with clientSession
	}
	delete iter;

Of course, if you’ve subclassed "RTSPServer::RTSPClientSession”, then you should use your subclass name instead.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list