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

NAME

6       CURLOPT_STREAM_DEPENDS_E  -  set stream this transfer depends on exclu‐
7       sively
8

SYNOPSIS

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

DESCRIPTION

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

DEFAULT

36       NULL
37

PROTOCOLS

39       HTTP/2
40

EXAMPLE

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

AVAILABILITY

55       Added in 7.46.0
56

RETURN VALUE

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

SEE ALSO

62       CURLOPT_STREAM_WEIGHT(3), CURLOPT_STREAM_DEPENDS(3),
63
64
65
66libcurl 7.69.1                  April 17, 2018     CURLOPT_STREAM_DEPENDS_E(3)
Impressum