• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2c: Copyright (C) Daniel Stenberg, <daniel.se>, et al.
3SPDX-License-Identifier: curl
4Title: CURLINFO_RTSP_SESSION_ID
5Section: 3
6Source: libcurl
7See-also:
8  - CURLINFO_RTSP_CSEQ_RECV (3)
9  - curl_easy_getinfo (3)
10  - curl_easy_setopt (3)
11---
12
13# NAME
14
15CURLINFO_RTSP_SESSION_ID - get RTSP session ID
16
17# SYNOPSIS
18
19~~~c
20#include <curl/curl.h>
21
22CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
23~~~
24
25# DESCRIPTION
26
27Pass a pointer to a char pointer to receive a pointer to a string holding the
28most recent RTSP Session ID.
29
30Applications wishing to resume an RTSP session on another connection should
31retrieve this info before closing the active connection.
32
33The **id** pointer is NULL or points to private memory. You MUST NOT free -
34it gets freed when you call curl_easy_cleanup(3) on the corresponding
35CURL handle.
36
37# PROTOCOLS
38
39RTSP
40
41# EXAMPLE
42
43~~~c
44int main(void)
45{
46  CURL *curl = curl_easy_init();
47  if(curl) {
48    CURLcode res;
49    curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
50    res = curl_easy_perform(curl);
51    if(res == CURLE_OK) {
52      char *id;
53      curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
54    }
55    curl_easy_cleanup(curl);
56  }
57}
58~~~
59
60# AVAILABILITY
61
62Added in 7.20.0
63
64# RETURN VALUE
65
66Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
67