1CURLOPT_STREAM_DEPENDS_E(3)curl_easy_setopt optionsCURLOPT_STREAM_DEPENDS_E(3)
2
3
4

NAME

6       CURLOPT_STREAM_DEPENDS_E - stream this transfer depends on exclusively
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS_E,
12                                 CURL *dephandle);
13

DESCRIPTION

15       Pass  a  CURL  * pointer in dephandle to identify the stream within the
16       same connection that this stream is depending  upon  exclusively.  That
17       means it depends on it and sets the Exclusive bit.
18
19       The  spec  says "Including a dependency expresses a preference to allo‐
20       cate resources to the identified stream rather than  to  the  dependent
21       stream."
22
23       Setting a dependency with the exclusive flag for a reprioritized stream
24       causes all the dependencies of the new parent stream to  become  depen‐
25       dent on the reprioritized stream.
26
27       This option can be set during transfer.
28
29       dephandle must not be the same as handle, that will cause this function
30       to return an error. It must be another easy handle, and it  also  needs
31       to  be  a  handle  of a transfer that will be sent over the same HTTP/2
32       connection for this option to have an actual effect.
33

DEFAULT

35       NULL
36

PROTOCOLS

38       HTTP/2
39

EXAMPLE

41       CURL *curl = curl_easy_init();
42       CURL *curl2 = curl_easy_init(); /* a second handle */
43       if(curl) {
44         curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one");
45
46         /* the second depends on the first */
47         curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two");
48         curl_easy_setopt(curl2, CURLOPT_STREAM_DEPENDS_E, curl);
49
50         /* then add both to a multi handle and transfer them! */
51       }
52

AVAILABILITY

54       Added in 7.46.0
55

RETURN VALUE

57       Returns CURLE_OK if the option is supported,  and  CURLE_UNKNOWN_OPTION
58       if not.
59

SEE ALSO

61       CURLOPT_STREAM_WEIGHT(3), CURLOPT_STREAM_DEPENDS(3),
62
63
64
65libcurl 7.85.0                   May 17, 2022      CURLOPT_STREAM_DEPENDS_E(3)
Impressum