GNURLOPT_STREAM_DEPENDS(3)
okay bestie, welcome to GNURLOPT_STREAM_DEPENDS(3), a page straight out of the curl_easy_setopt options manual. itβs giving βthis transfer depends on that streamβ energy, and weβre gonna get into all of it. π
β¨ NAME β¨
CURLOPT_STREAM_DEPENDS β set stream this transfer depends on. π«Ά
π¦ SYNOPSIS π¦
#include <gnurl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS, CURL
*dephandle);
π DESCRIPTION π
So you pass a CURL * pointer in dephandle, and that identifies the stream within the same connection that this stream is depending upon. π
This option clears the exclusive bit and is mutually exclusive to the CURLOPT_STREAM_DEPENDS_E(3) option. no cap, they canβt both be doing their thing at the same time.
The spec says βIncluding a dependency expresses a preference to allocate resources to the identified stream rather than to the dependent stream.β β¨
This option can be set during transfer. literally mid-transfer, itβs fine.
bestie, listen:dephandlemust not be the same ashandleβ that will cause this function to return an error. π It must be another easy handle, and it also needs to be a handle of a transfer that will be sent over the same HTTP/2 connection for this option to have an actual effect.
π DEFAULT π
NULL β thatβs the default, bestie.
π PROTOCOLS π
HTTP/2
π§ EXAMPLE π§
CURL *curl = curl_easy_init();
CURL *curl2 = curl_easy_init(); /* a second handle */
if(curl) {
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one");
/* the second depends on the first */
curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two");
curl_easy_setopt(curl2, CURLOPT_STREAM_DEPENDS, curl);
/* then add both to a multi handle and transfer them! */
}
β AVAILABILITY β
Added in 7.46.0 π
π RETURN VALUE π
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. fr fr.
π SEE ALSO π
kiss kiss, bestie π β that was GNURLOPT_STREAM_DEPENDS(3) from libcurl 7.46.0, dated 13 Sep 2015. π«Ά
π¦ where this page comes from
- nixos 26.05: libgnurl 7.72.0
- nixpkgs unstable: libgnurl 7.72.0
- Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms