CURLOPT_RTSP_SESSION_ID.3 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .\" generated by cd2nroff 0.1 from CURLOPT_RTSP_SESSION_ID.md
  2. .TH CURLOPT_RTSP_SESSION_ID 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_RTSP_SESSION_ID \- RTSP session ID
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
  9. .fi
  10. .SH DESCRIPTION
  11. Pass a char pointer as a parameter to set the value of the current RTSP
  12. Session ID for the handle. Useful for resuming an in\-progress session. Once
  13. this value is set to any non\-NULL value, libcurl returns
  14. \fICURLE_RTSP_SESSION_ERROR\fP if ID received from the server does not match. If
  15. unset (or set to NULL), libcurl automatically sets the ID the first time the
  16. server sets it in a response.
  17. The application does not have to keep the string around after setting this
  18. option.
  19. .SH DEFAULT
  20. NULL
  21. .SH PROTOCOLS
  22. This functionality affects rtsp only
  23. .SH EXAMPLE
  24. .nf
  25. int main(void)
  26. {
  27. CURL *curl = curl_easy_init();
  28. if(curl) {
  29. CURLcode res;
  30. char *prev_id; /* saved from before somehow */
  31. curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
  32. curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
  33. res = curl_easy_perform(curl);
  34. curl_easy_cleanup(curl);
  35. }
  36. }
  37. .fi
  38. .SH AVAILABILITY
  39. Added in curl 7.20.0
  40. .SH RETURN VALUE
  41. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  42. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  43. .SH SEE ALSO
  44. .BR CURLOPT_RTSP_REQUEST (3),
  45. .BR CURLOPT_RTSP_STREAM_URI (3)