CURLINFO_RTSP_SESSION_ID(3)
β¨ CURLINFO_RTSP_SESSION_ID β¨
okay so bestie, welcome to the Library Functions Manual π β this is the page for CURLINFO_RTSP_SESSION_ID, and it's literally about grabbing your RTSP session ID so you can keep the vibe going across connections. no cap, it's iconic. π
πΈ NAME πΈ
CURLINFO_RTSP_SESSION_ID β the RTSP session ID, and yes it's exactly what it sounds like, bestie β¨
π¦ SYNOPSIS π¦
#include <curl/curl.h>
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
π DESCRIPTION π
so here's the tea β: you pass a pointer to a char pointer, and it receives a pointer to a string that holds the most recent RTSP Session ID. literally the freshest session ID you've got, periodt. π«Ά
now, if your application wants to resume an RTSP session on another connection, you should retrieve this info before closing the active connection β that's the whole point, bestie, don't close the door before you grab the keys πβ¨
β οΈ okay important vibe check: theidpointer isNULLor points to private memory. you must not free it β do not do it, not today, not ever π the memory gets freed automatically when you callcurl_easy_cleanup(3)on the corresponding curl handle. so just let it be, she's taken care of π
π§ PROTOCOLS π§
this functionality affects rtsp only β like, it's rtsp-exclusive, iykyk π¦
β¨ EXAMPLE β¨
okay here's the whole flex, bestie β a full little main function showing you the moves π
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
result = curl_easy_perform(curl);
if(result == CURLE_OK) {
char *id;
curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
}
curl_easy_cleanup(curl);
}
}
π AVAILABILITY π
this icon was Added in curl 7.20.0 β vintage but still slaying π
β¨
π RETURN VALUE π
curl_easy_getinfo(3) returns a CURLcode indicating success or error. π
CURLE_OK(0) β everything was OK, we love to see it π- non-zero β an error occurred π see
libcurl-errors(3)for the deets
π₯ SEE ALSO π₯
that's the whole page, bestie! ππ«Ά this was libcurl, dated 2026-10-12, and the page is CURLINFO_RTSP_SESSION_ID(3) β now go slay those RTSP sessions, periodt β¨π
π
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms