GNURLOPT_INTERLEAVEDATA(3)

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

πŸ’– GNURLOPT_INTERLEAVEDATA(3) πŸ’–

okay so bestie, this lil page comes from the curl_easy_setopt options manual, and the manual name is literally GNURLOPT_INTERLEAVEDATA(3). we are gonna get into it, no cap. 🫢


✨ NAME ✨

CURLOPT_INTERLEAVEDATA β€” custom pointer passed to RTSP interleave callback. that's the whole vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_INTERLEAVEDATA, void
*pointer);

🌸 DESCRIPTION 🌸

bestie, this is the userdata pointer that gets passed to CURLOPT_INTERLEAVEFUNCTION(3) when interleaved RTP data is received. ✨

and hear me out: if the interleave function callback is not set, then this pointer is not used anywhere. like, it's just sitting there, iconic but unemployed. πŸ’€


πŸŽ€ DEFAULT πŸŽ€

NULL β€” literally the default-est default, nothing set, no pointer, bye. πŸ™ˆ


🌈 PROTOCOLS 🌈

RTSP β€” that's the protocol for this one. periodt. πŸ’œ


πŸ“ EXAMPLE πŸ“

here's the example, kept exactly as the manual gives it, bestie:

static size_t rtp_write(void *ptr, size_t size, size_t nmemb, void *user)
{
  struct local *l = (struct local *)user;
  /* take care of the packet in 'ptr', then return... */
  return size * nmemb;
}
{
  struct local rtp_data;
  curl_easy_setopt(curl, CURLOPT_INTERLEAVEFUNCTION, rtp_write);
  curl_easy_setopt(curl, CURLOPT_INTERLEAVEDATA, &rtp_data);
}

⭐ AVAILABILITY ⭐

Added in 7.20.0. yes queen, she's been around. πŸ‘‘


πŸ”₯ RETURN VALUE πŸ”₯

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. simple as that. πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

go peek at these, iykyk:

(yes, the original has that trailing comma. we respect the comma. πŸŽ€)


mwah πŸ’‹ this page was living in libcurl 7.37.0, dated 19 Jun 2014, and the footer name is GNURLOPT_INTERLEAVEDATA(3) β€” periodt. 🌈✨

πŸ“¦ where this page comes from