I am looking for the best way to handle tracking connection time to a given stream and first of all, I am not to sure what would be the best way to handle connection time for billing. One of my concerns is avoiding to many calls to functions from either timer events or rpc calls.
I guess at a first glance the best way to get this done is to have variable containing clients and connection date time and when they leave, update the database. However depending on how much time the user has in credits it would be wise to have a timer event of some sort preset to the moment where his credits expire.
So in order to get this to work I need to find what module function will get called on browser close or when the stream connection is terminated where I still have the client information in scope.
So basically my question is what function wowza calls where I still have the client in scope.
I will also ask is there a better way to get this done?