quickjs-tart

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

CURLOPT_RTSP_SESSION_ID.md (1641B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_RTSP_SESSION_ID
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_RTSP_REQUEST (3)
      9   - CURLOPT_RTSP_STREAM_URI (3)
     10 Protocol:
     11   - RTSP
     12 Added-in: 7.20.0
     13 ---
     14 
     15 # NAME
     16 
     17 CURLOPT_RTSP_SESSION_ID - RTSP session ID
     18 
     19 # SYNOPSIS
     20 
     21 ~~~c
     22 #include <curl/curl.h>
     23 
     24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char *id);
     25 ~~~
     26 
     27 # DESCRIPTION
     28 
     29 Pass a char pointer as a parameter to set the value of the current RTSP
     30 Session ID for the handle. Useful for resuming an in-progress session. Once
     31 this value is set to any non-NULL value, libcurl returns
     32 *CURLE_RTSP_SESSION_ERROR* if ID received from the server does not match. If
     33 unset (or set to NULL), libcurl automatically sets the ID the first time the
     34 server sets it in a response.
     35 
     36 The application does not have to keep the string around after setting this
     37 option.
     38 
     39 Using this option multiple times makes the last set string override the
     40 previous ones. Set it to NULL to disable its use again.
     41 
     42 # DEFAULT
     43 
     44 NULL
     45 
     46 # %PROTOCOLS%
     47 
     48 # EXAMPLE
     49 
     50 ~~~c
     51 int main(void)
     52 {
     53   CURL *curl = curl_easy_init();
     54   if(curl) {
     55     CURLcode res;
     56     char *prev_id = "old"; /* saved from before somehow */
     57     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     58     curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
     59     res = curl_easy_perform(curl);
     60     curl_easy_cleanup(curl);
     61   }
     62 }
     63 ~~~
     64 
     65 # %AVAILABILITY%
     66 
     67 # RETURN VALUE
     68 
     69 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     70 
     71 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     72 libcurl-errors(3).