quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLINFO_RTSP_SESSION_ID.md (1448B)


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