[Live-devel] Detect socket disconnect
Holm Karstensen Steffen
steffen.karstensen at dk.saabgroup.com
Wed Oct 30 02:15:42 PDT 2019
Hi,
I am developing an RTSP client using Live555 that streams RTP audio to a third party RTSP server.
I have created an RTSPClient subclass to implement this, and I'm wondering how to detect if the TCP socket connection to the server is closed while I'm streaming audio to it.
There is the MultiFramedRTPSink::setOnSendErrorFunc(), which I use, but the callback is not called.
>From debugging the code it seems to be because the SocketDescriptor::readSocket() call in SocketDescriptor::tcpReadHandler1() fails, which in turn calls RTPInterface::removeStreamSocket() and now whenever RTPInterface::sendPacket() is called it returns True, even though no data was sent (fTCPStreams is NULL), and the onSendErrorFunc callback is never called.
Is there another way to detect socket disconnect in my application?
Thanks,
Steffen Holm Karstensen
Saab Danmark A/S
More information about the live-devel
mailing list