GNURLOPT_RTSP_SESSION_ID(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

✨ NAME ✨

okay bestie, welcome to the GNURLOPT_RTSP_SESSION_ID(3) page from the curl_easy_setopt options manual β€” the gnurl edition. This one is about setting the RTSP session ID, and yes it's giving niche-but-iconic. πŸ’…

CURLOPT_RTSP_SESSION_ID β€” set RTSP session ID. That's the name, periodt. πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_RTSP_SESSION_ID, char
*id);

🌸 DESCRIPTION 🌸

Pass a char * as a parameter to set the value of the current RTSP Session ID for the handle. Lowkey useful for resuming an in-progress session. 🫢

Once this value is set to any non-NULL value, libcurl will return CURLE_RTSP_SESSION_ERROR if ID received from the server does not match. If unset (or set to NULL), libcurl will automatically set the ID the first time the server sets it in a response. No cap, that's the whole vibe check. ✨

The application does not have to keep the string around after setting this option. So you can let it go, bestie. πŸ¦‹

πŸŽ€ DEFAULT πŸŽ€

NULL β€” that's the default, periodt. πŸ’–

🌈 PROTOCOLS 🌈

RTSP β€” that's the protocol, bestie. πŸ’…

πŸ”₯ EXAMPLE πŸ”₯

Here's the code, keep it exactly as-is:

CURL *curl = curl_easy_init();
if(curl) {
  char *prev_id; /* saved from before somehow */
  curl_easy_setopt(curl, CURLOPT_URL, "rtsp://example.com/");
  curl_easy_setopt(curl, CURLOPT_RTSP_SESSION_ID, prev_id);
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

⭐ AVAILABILITY ⭐

Added in 7.20.0 β€” she's been here a minute. πŸ’œ

πŸ’œ RETURN VALUE πŸ’œ

Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or CURLE_OUT_OF_MEMORY if there was insufficient heap space. That's the whole return-value moment. 😭

🫢 SEE ALSO 🫢

xoxo, your Unix bestie β€” this GNURLOPT_RTSP_SESSION_ID(3) page comes from libcurl 7.37.0 and is dated 19 Jun 2014. πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from