2015-09-13 22:07:05 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\" * _ _ ____ _
|
|
|
|
.\" * Project ___| | | | _ \| |
|
|
|
|
.\" * / __| | | | |_) | |
|
|
|
|
.\" * | (__| |_| | _ <| |___
|
|
|
|
.\" * \___|\___/|_| \_\_____|
|
|
|
|
.\" *
|
2023-01-02 20:51:48 +08:00
|
|
|
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2015-09-13 22:07:05 +08:00
|
|
|
.\" *
|
|
|
|
.\" * This software is licensed as described in the file COPYING, which
|
|
|
|
.\" * you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
.\" * are also available at https://curl.se/docs/copyright.html.
|
2015-09-13 22:07:05 +08:00
|
|
|
.\" *
|
|
|
|
.\" * You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
.\" * copies of the Software, and permit persons to whom the Software is
|
|
|
|
.\" * furnished to do so, under the terms of the COPYING file.
|
|
|
|
.\" *
|
|
|
|
.\" * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
.\" * KIND, either express or implied.
|
|
|
|
.\" *
|
|
|
|
.\" * SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
.\" *
|
2015-09-13 22:07:05 +08:00
|
|
|
.\" **************************************************************************
|
|
|
|
.\"
|
2023-04-26 14:58:35 +08:00
|
|
|
.TH CURLOPT_STREAM_DEPENDS 3 "13 Sep 2015" libcurl libcurl
|
2015-09-13 22:07:05 +08:00
|
|
|
.SH NAME
|
2021-09-09 04:55:58 +08:00
|
|
|
CURLOPT_STREAM_DEPENDS \- stream this transfer depends on
|
2015-09-13 22:07:05 +08:00
|
|
|
.SH SYNOPSIS
|
2021-11-26 21:20:18 +08:00
|
|
|
.nf
|
2015-09-13 22:07:05 +08:00
|
|
|
#include <curl/curl.h>
|
|
|
|
|
2021-11-26 21:20:18 +08:00
|
|
|
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_STREAM_DEPENDS,
|
|
|
|
CURL *dephandle);
|
|
|
|
.fi
|
2015-09-13 22:07:05 +08:00
|
|
|
.SH DESCRIPTION
|
|
|
|
Pass a CURL * pointer in \fIdephandle\fP to identify the stream within the
|
|
|
|
same connection that this stream is depending upon. This option clears the
|
2017-05-31 19:39:56 +08:00
|
|
|
exclusive bit and is mutually exclusive to the
|
2015-09-13 22:07:05 +08:00
|
|
|
\fICURLOPT_STREAM_DEPENDS_E(3)\fP option.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
\fIdephandle\fP must not be the same as \fIhandle\fP, 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.
|
|
|
|
.SH DEFAULT
|
|
|
|
NULL
|
|
|
|
.SH PROTOCOLS
|
|
|
|
HTTP/2
|
|
|
|
.SH EXAMPLE
|
2017-05-31 17:56:28 +08:00
|
|
|
.nf
|
|
|
|
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! */
|
|
|
|
}
|
|
|
|
.fi
|
2015-09-13 22:07:05 +08:00
|
|
|
.SH AVAILABILITY
|
|
|
|
Added in 7.46.0
|
|
|
|
.SH RETURN VALUE
|
|
|
|
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
|
|
|
.SH "SEE ALSO"
|
2015-10-22 04:47:24 +08:00
|
|
|
.BR CURLOPT_STREAM_WEIGHT "(3), " CURLOPT_STREAM_DEPENDS_E "(3), "
|