1CURLOPT_RTSP_SESSION_ID(3) curl_easy_setopt options CURLOPT_RTSP_SESSION_ID(3)
2
3
4

NAME

6       CURLOPT_RTSP_SESSION_ID - RTSP session ID
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
12

DESCRIPTION

14       Pass  a char * as a parameter to set the value of the current RTSP Ses‐
15       sion ID for the handle. Useful for  resuming  an  in-progress  session.
16       Once  this  value  is  set  to  any non-NULL value, libcurl will return
17       CURLE_RTSP_SESSION_ERROR if ID received from the server does not match.
18       If  unset  (or  set to NULL), libcurl will automatically set the ID the
19       first time the server sets it in a response.
20
21       The application does not have to keep the string around  after  setting
22       this option.
23

DEFAULT

25       NULL
26

PROTOCOLS

28       RTSP
29

EXAMPLE

31       CURL *curl = curl_easy_init();
32       if(curl) {
33         char *prev_id; /* saved from before somehow */
34         curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
35         curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
36         ret = curl_easy_perform(curl);
37         curl_easy_cleanup(curl);
38       }
39

AVAILABILITY

41       Added in 7.20.0
42

RETURN VALUE

44       Returns  CURLE_OK  if  the option is supported, CURLE_UNKNOWN_OPTION if
45       not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space.
46

SEE ALSO

48       CURLOPT_RTSP_REQUEST(3), CURLOPT_RTSP_STREAM_URI(3),
49
50
51
52libcurl 7.85.0                   May 17, 2022       CURLOPT_RTSP_SESSION_ID(3)
Impressum