CURLOPT_STREAM_DEPENDS_E.3 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. .\" **************************************************************************
  2. .\" * _ _ ____ _
  3. .\" * Project ___| | | | _ \| |
  4. .\" * / __| | | | |_) | |
  5. .\" * | (__| |_| | _ <| |___
  6. .\" * \___|\___/|_| \_\_____|
  7. .\" *
  8. .\" * Copyright (C) 1998 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
  9. .\" *
  10. .\" * This software is licensed as described in the file COPYING, which
  11. .\" * you should have received as part of this distribution. The terms
  12. .\" * are also available at https://curl.haxx.se/docs/copyright.html.
  13. .\" *
  14. .\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  15. .\" * copies of the Software, and permit persons to whom the Software is
  16. .\" * furnished to do so, under the terms of the COPYING file.
  17. .\" *
  18. .\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  19. .\" * KIND, either express or implied.
  20. .\" *
  21. .\" **************************************************************************
  22. .\"
  23. .TH CURLOPT_STREAM_DEPENDS_E 3 "April 17, 2018" "libcurl 7.61.1" "curl_easy_setopt options"
  24. .SH NAME
  25. CURLOPT_STREAM_DEPENDS_E \- set stream this transfer depends on exclusively
  26. .SH SYNOPSIS
  27. #include <curl/curl.h>
  28. CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS_E, CURL *dephandle);
  29. .SH DESCRIPTION
  30. Pass a CURL * pointer in \fIdephandle\fP to identify the stream within the
  31. same connection that this stream is depending upon exclusively. That means it
  32. depends on it and sets the Exclusive bit.
  33. The spec says "Including a dependency expresses a preference to allocate
  34. resources to the identified stream rather than to the dependent stream."
  35. Setting a dependency with the exclusive flag for a reprioritized stream causes
  36. all the dependencies of the new parent stream to become dependent on the
  37. reprioritized stream.
  38. This option can be set during transfer.
  39. \fIdephandle\fP must not be the same as \fIhandle\fP, that will cause this
  40. function to return an error. It must be another easy handle, and it also needs
  41. to be a handle of a transfer that will be sent over the same HTTP/2 connection
  42. for this option to have an actual effect.
  43. .SH DEFAULT
  44. NULL
  45. .SH PROTOCOLS
  46. HTTP/2
  47. .SH EXAMPLE
  48. .nf
  49. CURL *curl = curl_easy_init();
  50. CURL *curl2 = curl_easy_init(); /* a second handle */
  51. if(curl) {
  52. curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/one");
  53. /* the second depends on the first */
  54. curl_easy_setopt(curl2, CURLOPT_URL, "https://example.com/two");
  55. curl_easy_setopt(curl2, CURLOPT_STREAM_DEPENDS_E, curl);
  56. /* then add both to a multi handle and transfer them! */
  57. }
  58. .fi
  59. .SH AVAILABILITY
  60. Added in 7.46.0
  61. .SH RETURN VALUE
  62. Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
  63. .SH "SEE ALSO"
  64. .BR CURLOPT_STREAM_WEIGHT "(3), " CURLOPT_STREAM_DEPENDS "(3), "