[Live-devel] Knowing when a client session is cleaned up?

Ross Finlayson finlayson at live555.com
Fri Aug 19 12:55:47 PDT 2016


> We are wanting to know when a session is cleaned up.

By “session”, in this case, I assume that you mean a “ClientSession” object (which a server uses to keep track of an interaction with a particular client).  (Note that we also have “ServerMediaSession” objects (which describe media to be streamed, independent of which client(s) may be requesting it) and “ClientConnection” objects (which describe a client’s TCP connection to the server), and also “MediaSession” objects (which are used by RTSP clients).  So you need to be a lot more specific than just saying “session”.)

But, assuming that you meant a “ClientSession” (specifically, a “RTSPClientSession”), then you want some ’notification' when a “RTSPClientSession” is deleted.  The solution to this is easy: Define your own subclass of “RTSPClientSession”, and add this ‘notification’ to its destructor.

If you do this, you will also need to define your own subclass of “RTSPServer”, and - in your subclass - redefine the “createNewClientSession()” virtual function to create a new object of your “RTSPClientSession” subclass (rather than just a new “RTSPClientSession”).

You can do all of this without modifying the supplied source code.  (Remember that you can’t expect any support on this mailing list if you modify the supplied code.)


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




More information about the live-devel mailing list