CURLOPT_RTSP_TRANSPORT.3 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. .\" generated by cd2nroff 0.1 from CURLOPT_RTSP_TRANSPORT.md
  2. .TH CURLOPT_RTSP_TRANSPORT 3 "2025-01-17" libcurl
  3. .SH NAME
  4. CURLOPT_RTSP_TRANSPORT \- RTSP Transport: header
  5. .SH SYNOPSIS
  6. .nf
  7. #include <curl/curl.h>
  8. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_TRANSPORT,
  9. char *transport);
  10. .fi
  11. .SH DESCRIPTION
  12. Pass a char pointer to tell libcurl what to pass for the Transport: header for
  13. this RTSP session. This is mainly a convenience method to avoid needing to set
  14. a custom Transport: header for every SETUP request. The application must set a
  15. Transport: header before issuing a SETUP request.
  16. The application does not have to keep the string around after setting this
  17. option.
  18. .SH DEFAULT
  19. NULL
  20. .SH PROTOCOLS
  21. This functionality affects rtsp only
  22. .SH EXAMPLE
  23. .nf
  24. int main(void)
  25. {
  26. CURL *curl = curl_easy_init();
  27. if(curl) {
  28. CURLcode res;
  29. curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
  30. curl_easy_setopt(curl, CURLOPT_RTSP_REQUEST, CURL_RTSPREQ_SETUP);
  31. curl_easy_setopt(curl, CURLOPT_RTSP_TRANSPORT,
  32. "RTP/AVP;unicast;client_port=4588-4589");
  33. res = curl_easy_perform(curl);
  34. curl_easy_cleanup(curl);
  35. }
  36. }
  37. .fi
  38. .SH AVAILABILITY
  39. Added in curl 7.20.0
  40. .SH RETURN VALUE
  41. Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
  42. CURLE_OUT_OF_MEMORY if there was insufficient heap space.
  43. .SH SEE ALSO
  44. .BR CURLOPT_RTSP_REQUEST (3),
  45. .BR CURLOPT_RTSP_SESSION_ID (3)