1CURLOPT_STREAM_DEPENDS(3)  curl_easy_setopt options  CURLOPT_STREAM_DEPENDS(3)
2
3
4

NAME

6       CURLOPT_STREAM_DEPENDS - stream this transfer depends on
7

SYNOPSIS

9       #include <curl/curl.h>
10
11       CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS,
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. This option  clears
17       the  exclusive  bit and is mutually exclusive to the CURLOPT_STREAM_DE‐
18       PENDS_E(3) option.
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       This option can be set during transfer.
25
26       dephandle must not be the same as handle, that will cause this function
27       to  return  an error. It must be another easy handle, and it also needs
28       to be a handle of a transfer that will be sent  over  the  same  HTTP/2
29       connection for this option to have an actual effect.
30

DEFAULT

32       NULL
33

PROTOCOLS

35       HTTP/2
36

EXAMPLE

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

AVAILABILITY

51       Added in 7.46.0
52

RETURN VALUE

54       Returns  CURLE_OK  if the option is supported, and CURLE_UNKNOWN_OPTION
55       if not.
56

SEE ALSO

58       CURLOPT_STREAM_WEIGHT(3), CURLOPT_STREAM_DEPENDS_E(3),
59
60
61
62libcurl 7.85.0                   May 17, 2022        CURLOPT_STREAM_DEPENDS(3)
Impressum