[Live-devel] I want to get disconnect event triggered from RTSP server.
Steve Ha
steveha at u2sr.com
Thu Mar 26 23:50:19 PDT 2020
Hi Ross,
My RTSP client application needs to recognize disconnect event triggered
from the RTSP server. But I could not find any way to get such event. By
debugging I could see the disconnect event happening inside the function
RTSPClient::handleResponseBytes() when the argument
'newBytesRead' has a value of -1.
Could you provide a virtual function so that the derived class can subclass
to receive the
disconnect event?
The implementation may be like this:
class RTSPClient {
...
protected:
virtual void OnConnectionClose() {};
};
RTSPClient::handleResponseBytes(int newBytesRead)
{
if (newBytesRead < 0) {
// likely disconnected
OnConnectionClose();
}
...
}
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20200327/0d8e612c/attachment.htm>
More information about the live-devel
mailing list