I was implementing rtsp with libcurl(sample code https://curl.haxx.se/libcurl/c/rtsp.html) I received RTP data after sending PLAY option. But the connection broke about ten minutes. I thought it might send heartbeat message to rtsp sever to keep session alive.
How to keep connection alive with libcurl ?
Code Flow :
// Set Option
// Set Describe
// Set Setup
// PLAY
/* Receive RTP DATA*/
while(1)
{
curl_easy_set_opt(curl, CURLOPT_WRITEFUNCTION, rtsp_write);
curl_easy_set_opt(curl, CURLOPT_WRITEDATA, NULL);
.....
}