[Live-devel] Check for client is still active

Ross Finlayson finlayson at live555.com
Mon Sep 17 01:56:36 PDT 2012


> As far as I understand to check the client ‘connection’ still active I need to use some scheduled function, like checkForPacketArrival() in playCommon.cpp (openRTSP) – check the client still received the packets. If no data is coming I need to add/accumulate delay in every scheduled call and if it reach some timeout threshold trigger cleanup function. Am i right?

Basically, yes.  However, you don't need to use the (rather complicated) method in the "checkForPacketArrival()" code to detect packet arrival.  Instead, if you have your own "MediaSink" subclass that's receiving the incoming data, you can use this to flag the arrival of incoming data.

You should also note the "TaskScheduler::rescheduleDelayedTask()" function.  You can call this function (e.g., from your "MediaSink" subclass) each time that data arrives.  This will ensure that the 'delayed task' gets called only if data does not arrive within the specified time.

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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120917/77b9707d/attachment-0001.html>


More information about the live-devel mailing list