CURLINFO_RTSP_SESSION_ID.3 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .\" generated by cd2nroff 0.1 from CURLINFO_RTSP_SESSION_ID.md
  2. .TH CURLINFO_RTSP_SESSION_ID 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a pointer to a char pointer to receive a pointer to a string holding the
  12. most recent RTSP Session ID.
  13. Applications wishing to resume an RTSP session on another connection should
  14. retrieve this info before closing the active connection.
  15. The \fBid\fP pointer is NULL or points to private memory. You MUST NOT free \-
  16. it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
  17. CURL handle.
  18. .SH PROTOCOLS
  19. This functionality affects rtsp only
  20. .SH EXAMPLE
  21. .nf
  22. int main(void)
  23. {
  24. CURL *curl = curl_easy_init();
  25. if(curl) {
  26. CURLcode res;
  27. curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
  28. res = curl_easy_perform(curl);
  29. if(res == CURLE_OK) {
  30. char *id;
  31. curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
  32. }
  33. curl_easy_cleanup(curl);
  34. }
  35. }
  36. .fi
  37. .SH AVAILABILITY
  38. Added in curl 7.20.0
  39. .SH RETURN VALUE
  40. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  41. .SH SEE ALSO
  42. .BR CURLINFO_RTSP_CSEQ_RECV (3),
  43. .BR curl_easy_getinfo (3),
  44. .BR curl_easy_setopt (3)