quickjs-tart

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

CURLOPT_RTSP_TRANSPORT.md (1510B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_RTSP_TRANSPORT
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_RTSP_REQUEST (3)
      9   - CURLOPT_RTSP_SESSION_ID (3)
     10 Protocol:
     11   - RTSP
     12 Added-in: 7.20.0
     13 ---
     14 
     15 # NAME
     16 
     17 CURLOPT_RTSP_TRANSPORT - RTSP Transport: header
     18 
     19 # SYNOPSIS
     20 
     21 ~~~c
     22 #include <curl/curl.h>
     23 
     24 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT,
     25                           char *transport);
     26 ~~~
     27 
     28 # DESCRIPTION
     29 
     30 Pass a char pointer to tell libcurl what to pass for the Transport: header for
     31 this RTSP session. This is mainly a convenience method to avoid needing to set
     32 a custom Transport: header for every SETUP request. The application must set a
     33 Transport: header before issuing a SETUP request.
     34 
     35 The application does not have to keep the string around after setting this
     36 option.
     37 
     38 # DEFAULT
     39 
     40 NULL
     41 
     42 # %PROTOCOLS%
     43 
     44 # EXAMPLE
     45 
     46 ~~~c
     47 int main(void)
     48 {
     49   CURL *curl = curl_easy_init();
     50   if(curl) {
     51     CURLcode res;
     52     curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
     53     curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
     54     curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT,
     55                      "RTP/AVP;unicast;client_port=4588-4589");
     56     res = curl_easy_perform(curl);
     57     curl_easy_cleanup(curl);
     58   }
     59 }
     60 ~~~
     61 
     62 # %AVAILABILITY%
     63 
     64 # RETURN VALUE
     65 
     66 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     67 
     68 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     69 libcurl-errors(3).