> I'm running the proxy server with user authentication added in. I want to > limit the users to one-minute sessions at a time. What is the "proper" way to > achieve this?
The way to do this is to delete (using “Medium::close()”) the “RTSPClientSession” object when the 1-minute time runs out. (This will automatically shut down any streaming that’s currently underway for that session.) Here’s what I’d do to implement this: - Subclass “RTSPServer”, and, in your subclass, define the following (public) member functions: static void handleSessionExpiration(u_int32_t sessionId); void handleSessionExpiration1(u_int32_t sessionId); - Also, redefine the “createNewClientSession()” virtual function, as follows: GenericMediaServer::ClientSession* MyRTSPServerSubclass::createNewClientSession(u_int32_t sessionId) { envir().taskScheduler().scheduleDelayedTask(60*1000000/*1 minute*/, (TaskFunc*)handleSessionExpiration, sessionId); return RTSPServer::createNewClientSession(sessionId); } - Implement "handleSessionExpiration()" and “handleSessionExpiration1()” as follows: void MyRTSPServerSubclass:: handleSessionExpiration(u_int32_t sessionId) { Some GlobalPointerToMyRTSPServer-> handleSessionExpiration1(sessionId); } void MyRTSPServerSubclass:: handleSessionExpiration1(u_int32_t sessionId) { Medium::close(lookupClientSession(sessionId)); } (Note that this has nothing to do with ‘authentication’; that’s a ‘red herring’.) Ross Finlayson Live Networks, Inc. http://www.live555.com/ _______________________________________________ live-devel mailing list live-devel@lists.live555.com http://lists.live555.com/mailman/listinfo/live-devel