Added dependencies locally
This commit is contained in:
35
deps/curl/docs/libcurl/opts/CMakeLists.txt
vendored
Normal file
35
deps/curl/docs/libcurl/opts/CMakeLists.txt
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
#***************************************************************************
|
||||
# _ _ ____ _
|
||||
# Project ___| | | | _ \| |
|
||||
# / __| | | | |_) | |
|
||||
# | (__| |_| | _ <| |___
|
||||
# \___|\___/|_| \_\_____|
|
||||
#
|
||||
# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
#
|
||||
# This software is licensed as described in the file COPYING, which
|
||||
# you should have received as part of this distribution. The terms
|
||||
# are also available at https://curl.se/docs/copyright.html.
|
||||
#
|
||||
# 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
|
||||
#
|
||||
###########################################################################
|
||||
# Load man_MANS from shared file
|
||||
transform_makefile_inc("Makefile.inc" "${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
include("${CMAKE_CURRENT_BINARY_DIR}/Makefile.inc.cmake")
|
||||
|
||||
add_manual_pages(man_MANS)
|
||||
|
||||
string(REPLACE ".3" ".html" HTMLPAGES "${man_MANS}")
|
||||
string(REPLACE ".3" ".pdf" PDFPAGES "${man_MANS}")
|
||||
add_custom_target(opts-html DEPENDS ${HTMLPAGES})
|
||||
add_custom_target(opts-pdf DEPENDS ${PDFPAGES})
|
||||
add_dependencies(html opts-html)
|
||||
add_dependencies(pdf opts-pdf)
|
81
deps/curl/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3
vendored
Normal file
81
deps/curl/docs/libcurl/opts/CURLINFO_ACTIVESOCKET.3
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_ACTIVESOCKET 3 "12 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_ACTIVESOCKET \- get the active socket
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_ACTIVESOCKET,
|
||||
curl_socket_t *socket);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_socket_t to receive the most recently active socket
|
||||
used for the transfer connection by this curl session. If the socket is no
|
||||
longer valid, \fICURL_SOCKET_BAD\fP is returned. When you are finished working
|
||||
with the socket, you must call \fIcurl_easy_cleanup(3)\fP as usual on the easy
|
||||
handle and let libcurl close the socket and cleanup other resources associated
|
||||
with the handle. This option returns the active socket only after the transfer
|
||||
is complete, and is typically used in combination with
|
||||
\fICURLOPT_CONNECT_ONLY(3)\fP, which skips the transfer phase.
|
||||
|
||||
\fICURLINFO_ACTIVESOCKET(3)\fP was added as a replacement for
|
||||
\fICURLINFO_LASTSOCKET(3)\fP since that one is not working on all platforms.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_socket_t sockfd;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Do not do the transfer - only connect to host */
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* Extract the socket from the curl handle */
|
||||
res = curl_easy_getinfo(curl, CURLINFO_ACTIVESOCKET, &sockfd);
|
||||
|
||||
if(res != CURLE_OK) {
|
||||
printf("Error: %s\\n", curl_easy_strerror(res));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.45.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_LASTSOCKET (3),
|
||||
.BR CURLOPT_CONNECT_ONLY (3)
|
75
deps/curl/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_APPCONNECT_TIME 3 "28 Aug 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_APPCONNECT_TIME \- get the time until the SSL/SSH handshake is completed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME,
|
||||
double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the SSL/SSH connect/handshake to the remote host was completed.
|
||||
This time is most often close to the \fICURLINFO_PRETRANSFER_TIME(3)\fP time,
|
||||
except for cases such as HTTP pipelining where the pretransfer time can be
|
||||
delayed due to waits in line for the pipeline and more.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double connect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME, &connect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", connect);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.19.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_APPCONNECT_TIME_T (3)
|
77
deps/curl/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3
vendored
Normal file
77
deps/curl/docs/libcurl/opts/CURLINFO_APPCONNECT_TIME_T.3
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_APPCONNECT_TIME_T 3 "28 Apr 2018" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_APPCONNECT_TIME_T \- time until the SSL/SSH handshake completed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_APPCONNECT_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the time, in microseconds, it took
|
||||
from the start until the SSL/SSH connect/handshake to the remote host was
|
||||
completed. This time is most often close to the
|
||||
\fICURLINFO_PRETRANSFER_TIME_T(3)\fP time, except for cases such as HTTP
|
||||
pipelining where the pretransfer time can be delayed due to waits in line for
|
||||
the pipeline and more.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t connect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_APPCONNECT_TIME_T, &connect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
|
||||
(long)(connect % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_APPCONNECT_TIME (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_CAINFO.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_CAINFO.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CAINFO 3 "20 May 2022" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CAINFO \- get the default built-in CA certificate path
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAINFO, char **path);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to a null-terminated
|
||||
string holding the default built-in path used for the \fICURLOPT_CAINFO(3)\fP
|
||||
option unless set by the user.
|
||||
|
||||
Note that in a situation where libcurl has been built to support multiple TLS
|
||||
libraries, this option might return a string even if the specific TLS library
|
||||
currently set to be used does not support \fICURLOPT_CAINFO(3)\fP.
|
||||
|
||||
This is a path identifying a single file containing CA certificates.
|
||||
|
||||
The \fBpath\fP pointer is set to NULL if there is no default path.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
char *cainfo = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_CAINFO, &cainfo);
|
||||
if(cainfo) {
|
||||
printf("default ca info path: %s\\n", cainfo);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.84.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CAPATH (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_CAPATH.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_CAPATH.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CAPATH 3 "20 May 2022" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CAPATH \- get the default built-in CA path string
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CAPATH, char **path);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to a null-terminated
|
||||
string holding the default built-in path used for the \fICURLOPT_CAPATH(3)\fP
|
||||
option unless set by the user.
|
||||
|
||||
Note that in a situation where libcurl has been built to support multiple TLS
|
||||
libraries, this option might return a string even if the specific TLS library
|
||||
currently set to be used does not support \fICURLOPT_CAPATH(3)\fP.
|
||||
|
||||
This is a path identifying a directory.
|
||||
|
||||
The \fBpath\fP pointer is set to NULL if there is no default path.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
char *capath = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_CAPATH, &capath);
|
||||
if(capath) {
|
||||
printf("default ca path: %s\\n", capath);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.84.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CAINFO (3)
|
105
deps/curl/docs/libcurl/opts/CURLINFO_CERTINFO.3
vendored
Normal file
105
deps/curl/docs/libcurl/opts/CURLINFO_CERTINFO.3
vendored
Normal file
@ -0,0 +1,105 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CERTINFO 3 "12 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CERTINFO \- get the TLS certificate chain
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CERTINFO,
|
||||
struct curl_certinfo **chainp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIstruct curl_certinfo *\fP and it is set to point to a
|
||||
struct that holds info about the server's certificate chain, assuming you had
|
||||
\fICURLOPT_CERTINFO(3)\fP enabled when the request was made.
|
||||
|
||||
.nf
|
||||
struct curl_certinfo {
|
||||
int num_of_certs;
|
||||
struct curl_slist **certinfo;
|
||||
};
|
||||
.fi
|
||||
|
||||
The \fIcertinfo\fP struct member is an array of linked lists of certificate
|
||||
information. The \fInum_of_certs\fP struct member is the number of
|
||||
certificates which is the number of elements in the array. Each certificate's
|
||||
list has items with textual information in the format "name:content" such as
|
||||
\&"Subject:Foo", "Issuer:Bar", etc. The items in each list varies depending on
|
||||
the SSL backend and the certificate.
|
||||
.SH PROTOCOLS
|
||||
All TLS-based
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
|
||||
|
||||
/* connect to any HTTPS site, trusted or not */
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_CERTINFO, 1L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
int i;
|
||||
struct curl_certinfo *ci;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CERTINFO, &ci);
|
||||
|
||||
if(!res) {
|
||||
printf("%d certs!\\n", ci->num_of_certs);
|
||||
|
||||
for(i = 0; i < ci->num_of_certs; i++) {
|
||||
struct curl_slist *slist;
|
||||
|
||||
for(slist = ci->certinfo[i]; slist; slist = slist->next)
|
||||
printf("%s\\n", slist->data);
|
||||
}
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
|
||||
See also the \fIcertinfo.c\fP example.
|
||||
.SH AVAILABILITY
|
||||
This option is only working in libcurl built with OpenSSL, GnuTLS, Schannel or
|
||||
Secure Transport. GnuTLS support added in 7.42.0. Schannel support added in
|
||||
7.50.0. Secure Transport support added in 7.79.0.
|
||||
|
||||
Added in 7.19.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CAPATH (3)
|
84
deps/curl/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3
vendored
Normal file
84
deps/curl/docs/libcurl/opts/CURLINFO_CONDITION_UNMET.3
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONDITION_UNMET 3 "1 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONDITION_UNMET \- get info on unmet time conditional or 304 HTTP response.
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONDITION_UNMET,
|
||||
long *unmet);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the number 1 if the condition provided in
|
||||
the previous request did not match (see \fICURLOPT_TIMECONDITION(3)\fP). Alas,
|
||||
if this returns a 1 you know that the reason you did not get data in return is
|
||||
because it did not fulfill the condition. The long this argument points to
|
||||
gets a zero stored if the condition instead was met. This can also return 1 if
|
||||
the server responded with a 304 HTTP status code, for example after sending a
|
||||
custom "If-Match-*" header.
|
||||
.SH PROTOCOLS
|
||||
HTTP and some
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* January 1, 2020 is 1577833200 */
|
||||
curl_easy_setopt(curl, CURLOPT_TIMEVALUE, 1577833200L);
|
||||
|
||||
/* If-Modified-Since the above time stamp */
|
||||
curl_easy_setopt(curl, CURLOPT_TIMECONDITION,
|
||||
(long)CURL_TIMECOND_IFMODSINCE);
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the time condition */
|
||||
long unmet;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONDITION_UNMET, &unmet);
|
||||
if(!res) {
|
||||
printf("The time condition was %sfulfilled\\n", unmet?"NOT":"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.19.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_TIMECONDITION (3),
|
||||
.BR CURLOPT_TIMEVALUE (3)
|
71
deps/curl/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3
vendored
Normal file
71
deps/curl/docs/libcurl/opts/CURLINFO_CONNECT_TIME.3
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONNECT_TIME 3 "28 Aug 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONNECT_TIME \- get the time until connect
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME, double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total time in seconds from the start
|
||||
until the connection to the remote host (or proxy) was completed.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double connect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME, &connect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", connect);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONNECT_TIME_T (3)
|
74
deps/curl/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLINFO_CONNECT_TIME_T.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONNECT_TIME_T 3 "28 Apr 2018" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONNECT_TIME_T \- get the time until connect
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONNECT_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the total time in microseconds from
|
||||
the start until the connection to the remote host (or proxy) was completed.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t connect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONNECT_TIME_T, &connect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", connect / 1000000,
|
||||
(long)(connect % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONNECT_TIME (3),
|
||||
.BR CURLOPT_CONNECTTIMEOUT (3)
|
75
deps/curl/docs/libcurl/opts/CURLINFO_CONN_ID.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLINFO_CONN_ID.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONN_ID 3 "07 June 2023" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONN_ID \- get the ID of the last connection used by the handle
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONN_ID,
|
||||
curl_off_t *conn_id);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the connection identifier last
|
||||
used by the handle. Stores -1 if there was no connection used.
|
||||
|
||||
The connection id is unique among all connections using the same
|
||||
connection cache. This is implicitly the case for all connections in the
|
||||
same multi handle.
|
||||
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
curl_off_t conn_id;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONN_ID, &conn_id);
|
||||
if(!res) {
|
||||
printf("Connection used: %" CURL_FORMAT_CURL_OFF_T "\\n", conn_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 8.2.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_XFER_ID (3)
|
74
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD 3 "1 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONTENT_LENGTH_DOWNLOAD \- get content-length of download
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD,
|
||||
double *content_length);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the content-length of the download. This
|
||||
is the value read from the Content-Length: field. Since 7.19.4, this returns
|
||||
-1 if the size is not known.
|
||||
|
||||
\fICURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3)\fP is a newer replacement that returns a more
|
||||
sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
double cl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &cl);
|
||||
if(!res) {
|
||||
printf("Size: %.0f\\n", cl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.6.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONTENT_LENGTH_UPLOAD (3)
|
71
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
vendored
Normal file
71
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_DOWNLOAD_T.3
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONTENT_LENGTH_DOWNLOAD_T 3 "25 May 2017" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T \- get content-length of download
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
|
||||
curl_off_t *content_length);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the content-length of the
|
||||
download. This is the value read from the Content-Length: field. Stores -1 if
|
||||
the size is not known.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
curl_off_t cl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
|
||||
if(!res) {
|
||||
printf("Download size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONTENT_LENGTH_UPLOAD_T (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONTENT_LENGTH_UPLOAD 3 "1 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONTENT_LENGTH_UPLOAD \- get the specified size of the upload
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD,
|
||||
double *content_length);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the specified size of the upload. Since
|
||||
7.19.4, this returns -1 if the size is not known.
|
||||
|
||||
\fICURLINFO_CONTENT_LENGTH_UPLOAD_T(3)\fP is a newer replacement that returns a
|
||||
more sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the upload */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
double cl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD, &cl);
|
||||
if(!res) {
|
||||
printf("Size: %.0f\\n", cl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.6.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_LENGTH_UPLOAD_T.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONTENT_LENGTH_UPLOAD_T 3 "25 May 2017" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONTENT_LENGTH_UPLOAD_T \- get the specified size of the upload
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T,
|
||||
curl_off_t *content_length);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the specified size of the
|
||||
upload. Stores -1 if the size is not known.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the upload */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
curl_off_t cl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_UPLOAD_T, &cl);
|
||||
if(!res) {
|
||||
printf("Upload size: %" CURL_FORMAT_CURL_OFF_T "\\n", cl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONTENT_LENGTH_DOWNLOAD_T (3)
|
79
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3
vendored
Normal file
79
deps/curl/docs/libcurl/opts/CURLINFO_CONTENT_TYPE.3
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_CONTENT_TYPE 3 "1 Sep 2015" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_CONTENT_TYPE \- get Content-Type
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_TYPE, char **ct);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the content-type of the downloaded
|
||||
object. This is the value read from the Content-Type: field. If you get NULL,
|
||||
it means that the server did not send a valid Content-Type header or that the
|
||||
protocol used does not support this.
|
||||
|
||||
The \fBct\fP pointer is set to NULL or pointing to private memory. You MUST
|
||||
NOT free it - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
|
||||
corresponding CURL handle.
|
||||
|
||||
The modern way to get this header from a response is to instead use the
|
||||
\fIcurl_easy_header(3)\fP function.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* extract the content-type */
|
||||
char *ct = NULL;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_CONTENT_TYPE, &ct);
|
||||
if(!res && ct) {
|
||||
printf("Content-Type: %s\\n", ct);
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.9.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_header (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_HEADERFUNCTION (3)
|
86
deps/curl/docs/libcurl/opts/CURLINFO_COOKIELIST.3
vendored
Normal file
86
deps/curl/docs/libcurl/opts/CURLINFO_COOKIELIST.3
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_COOKIELIST 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_COOKIELIST \- get all known cookies
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_COOKIELIST,
|
||||
struct curl_slist **cookies);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a 'struct curl_slist *' to receive a linked-list of all
|
||||
cookies curl knows (expired ones, too). do not forget to call
|
||||
\fIcurl_slist_free_all(3)\fP on the list after it has been used. If there are
|
||||
no cookies (cookies for the handle have not been enabled or simply none have
|
||||
been received) the 'struct curl_slist *' is made a NULL pointer.
|
||||
|
||||
Since 7.43.0 cookies that were imported in the Set-Cookie format without a
|
||||
domain name are not exported by this option.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* enable the cookie engine */
|
||||
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* extract all known cookies */
|
||||
struct curl_slist *cookies = NULL;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_COOKIELIST, &cookies);
|
||||
if(!res && cookies) {
|
||||
/* a linked list of cookies in cookie file format */
|
||||
struct curl_slist *each = cookies;
|
||||
while(each) {
|
||||
printf("%s\\n", each->data);
|
||||
each = each->next;
|
||||
}
|
||||
/* we must free these cookies when we are done */
|
||||
curl_slist_free_all(cookies);
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.14.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_COOKIELIST (3)
|
76
deps/curl/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3
vendored
Normal file
76
deps/curl/docs/libcurl/opts/CURLINFO_EFFECTIVE_METHOD.3
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_EFFECTIVE_METHOD 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_EFFECTIVE_METHOD \- get the last used HTTP method
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_EFFECTIVE_METHOD,
|
||||
char **methodp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass in a pointer to a char pointer and get the last used effective HTTP
|
||||
method.
|
||||
|
||||
In cases when you have asked libcurl to follow redirects, the method may not be
|
||||
the same method the first request would use.
|
||||
|
||||
The \fBmethodp\fP pointer is NULL or points to private memory. You MUST NOT
|
||||
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
|
||||
corresponding CURL handle.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_POSTFIELDS, "data");
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *method = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_METHOD, &method);
|
||||
if(method)
|
||||
printf("Redirected to method: %s\\n", method);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.72.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_CUSTOMREQUEST (3),
|
||||
.BR CURLOPT_FOLLOWLOCATION (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_EFFECTIVE_URL.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_EFFECTIVE_URL 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_EFFECTIVE_URL \- get the last used URL
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_EFFECTIVE_URL, char **urlp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass in a pointer to a char pointer and get the last used effective URL.
|
||||
|
||||
In cases when you have asked libcurl to follow redirects, it may not be the same
|
||||
value you set with \fICURLOPT_URL(3)\fP.
|
||||
|
||||
The \fBurlp\fP pointer is NULL or points to private memory. You MUST NOT free
|
||||
- it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *url = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_EFFECTIVE_URL, &url);
|
||||
if(url)
|
||||
printf("Redirect to: %s\\n", url);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_FOLLOWLOCATION (3)
|
80
deps/curl/docs/libcurl/opts/CURLINFO_FILETIME.3
vendored
Normal file
80
deps/curl/docs/libcurl/opts/CURLINFO_FILETIME.3
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_FILETIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_FILETIME \- get the remote time of the retrieved document
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME, long *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the remote time of the retrieved document
|
||||
in number of seconds since January 1 1970 in the GMT/UTC time zone. If you get
|
||||
-1, it can be because of many reasons (it might be unknown, the server might
|
||||
hide it or the server does not support the command that tells document time
|
||||
etc) and the time of the document is unknown.
|
||||
|
||||
You must tell libcurl to collect this information before the transfer is made,
|
||||
by using the \fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or
|
||||
you this unconditionally gets a -1 back.
|
||||
|
||||
Consider using \fICURLINFO_FILETIME_T(3)\fP to be able to extract dates beyond
|
||||
the year 2038 on systems using 32 bit longs (Windows).
|
||||
.SH PROTOCOLS
|
||||
HTTP(S), FTP(S), SFTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
/* Ask for filetime */
|
||||
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
long filetime = 0;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
|
||||
if((CURLE_OK == res) && (filetime >= 0)) {
|
||||
time_t file_time = (time_t)filetime;
|
||||
printf("filetime: %s", ctime(&file_time));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.5
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_FILETIME (3)
|
82
deps/curl/docs/libcurl/opts/CURLINFO_FILETIME_T.3
vendored
Normal file
82
deps/curl/docs/libcurl/opts/CURLINFO_FILETIME_T.3
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_FILETIME 3 "25 Jan 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_FILETIME_T \- get the remote time of the retrieved document
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FILETIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the remote time of the retrieved
|
||||
document in number of seconds since January 1 1970 in the GMT/UTC time
|
||||
zone. If you get -1, it can be because of many reasons (it might be unknown,
|
||||
the server might hide it or the server does not support the command that tells
|
||||
document time etc) and the time of the document is unknown.
|
||||
|
||||
You must ask libcurl to collect this information before the transfer is made,
|
||||
by using the \fICURLOPT_FILETIME(3)\fP option to \fIcurl_easy_setopt(3)\fP or
|
||||
you unconditionally get a -1 back.
|
||||
|
||||
This option is an alternative to \fICURLINFO_FILETIME(3)\fP to allow systems
|
||||
with 32 bit long variables to extract dates outside of the 32bit timestamp
|
||||
range.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S), FTP(S), SFTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
/* Ask for filetime */
|
||||
curl_easy_setopt(curl, CURLOPT_FILETIME, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
curl_off_t filetime;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
|
||||
if((CURLE_OK == res) && (filetime >= 0)) {
|
||||
time_t file_time = (time_t)filetime;
|
||||
printf("filetime: %s", ctime(&file_time));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.59.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_FILETIME (3)
|
74
deps/curl/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLINFO_FTP_ENTRY_PATH.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_FTP_ENTRY_PATH 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_FTP_ENTRY_PATH \- get entry path in FTP server
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_FTP_ENTRY_PATH, char **path);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
||||
path of the entry path. That is the initial path libcurl ended up in when
|
||||
logging on to the remote FTP server. This stores a NULL as pointer if
|
||||
something is wrong.
|
||||
|
||||
The \fBpath\fP pointer is NULL or points to private memory. You MUST NOT free
|
||||
- it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
FTP(S) and SFTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* extract the entry path */
|
||||
char *ep = NULL;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_FTP_ENTRY_PATH, &ep);
|
||||
if(!res && ep) {
|
||||
printf("Entry path was: %s\\n", ep);
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4. Works for SFTP since 7.21.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_HEADER_SIZE.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_HEADER_SIZE 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_HEADER_SIZE \- get size of retrieved headers
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HEADER_SIZE, long *sizep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the total size of all the headers
|
||||
received. Measured in number of bytes.
|
||||
|
||||
The total includes the size of any received headers suppressed by
|
||||
\fICURLOPT_SUPPRESS_CONNECT_HEADERS(3)\fP.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long size;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_HEADER_SIZE, &size);
|
||||
if(!res)
|
||||
printf("Header size: %ld bytes\\n", size);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_REQUEST_SIZE (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD (3)
|
81
deps/curl/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3
vendored
Normal file
81
deps/curl/docs/libcurl/opts/CURLINFO_HTTPAUTH_AVAIL.3
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_HTTPAUTH_AVAIL 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_HTTPAUTH_AVAIL \- get available HTTP authentication methods
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTPAUTH_AVAIL, long *authp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive a bitmask indicating the authentication
|
||||
method(s) available according to the previous response. The meaning of the
|
||||
bits is explained in the \fICURLOPT_HTTPAUTH(3)\fP option for
|
||||
\fIcurl_easy_setopt(3)\fP.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* extract the available authentication types */
|
||||
long auth;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_HTTPAUTH_AVAIL, &auth);
|
||||
if(!res) {
|
||||
if(!auth)
|
||||
printf("No auth available, perhaps no 401?\\n");
|
||||
else {
|
||||
printf("%s%s%s%s\\n",
|
||||
auth & CURLAUTH_BASIC ? "Basic ":"",
|
||||
auth & CURLAUTH_DIGEST ? "Digest ":"",
|
||||
auth & CURLAUTH_NEGOTIATE ? "Negotiate ":"",
|
||||
auth % CURLAUTH_NTLM ? "NTLM ":"");
|
||||
}
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added RFC 2617 in 7.10.8
|
||||
Added RFC 7616 in 7.57.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_PROXYAUTH_AVAIL (3),
|
||||
.BR CURLOPT_HTTPAUTH (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_HTTP_CONNECTCODE.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_HTTP_CONNECTCODE 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_HTTP_CONNECTCODE \- get the CONNECT response code
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_CONNECTCODE, long *p);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the last received HTTP proxy response code
|
||||
to a CONNECT request. The returned value is zero if no such response code was
|
||||
available.
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* typically CONNECT is used to do HTTPS over HTTP proxies */
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long code;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_HTTP_CONNECTCODE, &code);
|
||||
if(!res && code)
|
||||
printf("The CONNECT response code: %03ld\\n", code);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.10.7
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RESPONSE_CODE (3)
|
65
deps/curl/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3
vendored
Normal file
65
deps/curl/docs/libcurl/opts/CURLINFO_HTTP_VERSION.3
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_HTTP_VERSION 3 "11 May 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_HTTP_VERSION \- get the http version used in the connection
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_HTTP_VERSION, long *p);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the version used in the last http
|
||||
connection done using this handle. The returned value is
|
||||
CURL_HTTP_VERSION_1_0, CURL_HTTP_VERSION_1_1, CURL_HTTP_VERSION_2_0,
|
||||
CURL_HTTP_VERSION_3 or 0 if the version cannot be determined.
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long http_version;
|
||||
curl_easy_getinfo(curl, CURLINFO_HTTP_VERSION, &http_version);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.50.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RESPONSE_CODE (3)
|
81
deps/curl/docs/libcurl/opts/CURLINFO_LASTSOCKET.3
vendored
Normal file
81
deps/curl/docs/libcurl/opts/CURLINFO_LASTSOCKET.3
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_LASTSOCKET 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_LASTSOCKET \- get the last socket used
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LASTSOCKET, long *socket);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Deprecated since 7.45.0. Use \fICURLINFO_ACTIVESOCKET(3)\fP instead.
|
||||
|
||||
Pass a pointer to a long to receive the last socket used by this curl
|
||||
session. If the socket is no longer valid, -1 is returned. When you finish
|
||||
working with the socket, you must call \fIcurl_easy_cleanup(3)\fP as usual and
|
||||
let libcurl close the socket and cleanup other resources associated with the
|
||||
handle. This is typically used in combination with
|
||||
\fICURLOPT_CONNECT_ONLY(3)\fP.
|
||||
|
||||
NOTE: this API is deprecated since it is not working on win64 where the SOCKET
|
||||
type is 64 bits large while its 'long' is 32 bits. Use the
|
||||
\fICURLINFO_ACTIVESOCKET(3)\fP instead, if possible.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
long sockfd; /* does not work on win64! */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Do not do the transfer - only connect to host */
|
||||
curl_easy_setopt(curl, CURLOPT_CONNECT_ONLY, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* Extract the socket from the curl handle */
|
||||
res = curl_easy_getinfo(curl, CURLINFO_LASTSOCKET, &sockfd);
|
||||
|
||||
if(res != CURLE_OK) {
|
||||
printf("Error: %s\\n", curl_easy_strerror(res));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.2
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_ACTIVESOCKET (3),
|
||||
.BR CURLOPT_CONNECT_ONLY (3)
|
76
deps/curl/docs/libcurl/opts/CURLINFO_LOCAL_IP.3
vendored
Normal file
76
deps/curl/docs/libcurl/opts/CURLINFO_LOCAL_IP.3
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_LOCAL_IP 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_LOCAL_IP \- get local IP address of last connection
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_IP, char **ip);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to a null-terminated
|
||||
string holding the IP address of the local end of most recent connection done
|
||||
with this \fBcurl\fP handle. This string may be IPv6 when that is
|
||||
enabled. Note that you get a pointer to a memory area that is reused at next
|
||||
request so you need to copy the string if you want to keep the information.
|
||||
|
||||
The \fBip\fP pointer is NULL or points to private memory. You MUST NOT free -
|
||||
it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
char *ip;
|
||||
CURLcode res;
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the transfer */
|
||||
res = curl_easy_perform(curl);
|
||||
/* Check for errors */
|
||||
if((res == CURLE_OK) &&
|
||||
!curl_easy_getinfo(curl, CURLINFO_LOCAL_IP, &ip) && ip) {
|
||||
printf("Local IP: %s\\n", ip);
|
||||
}
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.21.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_PRIMARY_IP (3),
|
||||
.BR CURLINFO_LOCAL_PORT (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_LOCAL_PORT.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_LOCAL_PORT 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_LOCAL_PORT \- get the latest local port number
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_LOCAL_PORT, long *portp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the local port number of the most recent
|
||||
connection done with this \fBcurl\fP handle.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl;
|
||||
CURLcode res;
|
||||
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(CURLE_OK == res) {
|
||||
long port;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_LOCAL_PORT, &port);
|
||||
|
||||
if(CURLE_OK == res) {
|
||||
printf("We used local port: %ld\\n", port);
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.21.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_LOCAL_IP (3),
|
||||
.BR CURLINFO_PRIMARY_PORT (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_NAMELOOKUP_TIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_NAMELOOKUP_TIME \- get the name lookup time
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME,
|
||||
double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total time in seconds from the start
|
||||
until the name resolving was completed.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double namelookup;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME, &namelookup);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", namelookup);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_NAMELOOKUP_TIME_T (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_NAMELOOKUP_TIME_T.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_NAMELOOKUP_TIME_T 3 "28 Apr 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_NAMELOOKUP_TIME_T \- get the name lookup time in microseconds
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NAMELOOKUP_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the total time in microseconds
|
||||
from the start until the name resolving was completed.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t namelookup;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_NAMELOOKUP_TIME_T, &namelookup);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", namelookup / 1000000,
|
||||
(long)(namelookup % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_NAMELOOKUP_TIME (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_NUM_CONNECTS.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_NUM_CONNECTS 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_NUM_CONNECTS \- get number of created connections
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_NUM_CONNECTS, long *nump);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive how many new connections libcurl had to
|
||||
create to achieve the previous transfer (only the successful connects are
|
||||
counted). Combined with \fICURLINFO_REDIRECT_COUNT(3)\fP you are able to know
|
||||
how many times libcurl successfully reused existing connection(s) or not. See
|
||||
the connection options of \fIcurl_easy_setopt(3)\fP to see how libcurl tries
|
||||
to make persistent connections to save time.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long connects;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &connects);
|
||||
if(res)
|
||||
printf("It needed %ld connects\\n", connects);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.12.3
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3)
|
66
deps/curl/docs/libcurl/opts/CURLINFO_OS_ERRNO.3
vendored
Normal file
66
deps/curl/docs/libcurl/opts/CURLINFO_OS_ERRNO.3
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_OS_ERRNO 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_OS_ERRNO \- get errno number from last connect failure
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_OS_ERRNO, long *errnop);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the errno variable from a connect failure.
|
||||
Note that the value is only set on failure, it is not reset upon a successful
|
||||
operation. The number is OS and system specific.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res != CURLE_OK) {
|
||||
long error;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_OS_ERRNO, &error);
|
||||
if(res && error) {
|
||||
printf("Errno: %ld\\n", error);
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.12.2
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3)
|
77
deps/curl/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3
vendored
Normal file
77
deps/curl/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME.3
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PRETRANSFER_TIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PRETRANSFER_TIME \- get the time until the file transfer start
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME,
|
||||
double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the file transfer is just about to begin.
|
||||
|
||||
This time-stamp includes all pre-transfer commands and negotiations that are
|
||||
specific to the particular protocol(s) involved. It includes the sending of
|
||||
the protocol-specific instructions that trigger a transfer.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double pretransfer;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME, &pretransfer);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", pretransfer);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONNECT_TIME_T (3),
|
||||
.BR CURLINFO_PRETRANSFER_TIME_T (3)
|
79
deps/curl/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3
vendored
Normal file
79
deps/curl/docs/libcurl/opts/CURLINFO_PRETRANSFER_TIME_T.3
vendored
Normal file
@ -0,0 +1,79 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PRETRANSFER_TIME_T 3 "28 Apr 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PRETRANSFER_TIME_T \- get the time until the file transfer start
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRETRANSFER_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the time, in microseconds, it took
|
||||
from the start until the file transfer is just about to begin.
|
||||
|
||||
This time-stamp includes all pre-transfer commands and negotiations that are
|
||||
specific to the particular protocol(s) involved. It includes the sending of
|
||||
the protocol-specific instructions that trigger a transfer.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t pretransfer;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PRETRANSFER_TIME_T, &pretransfer);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld\\n",
|
||||
pretransfer / 1000000,
|
||||
(long)(pretransfer % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONNECT_TIME (3),
|
||||
.BR CURLINFO_PRETRANSFER_TIME_T (3)
|
77
deps/curl/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3
vendored
Normal file
77
deps/curl/docs/libcurl/opts/CURLINFO_PRIMARY_IP.3
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PRIMARY_IP 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PRIMARY_IP \- get IP address of last connection
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_IP, char **ip);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to a null-terminated
|
||||
string holding the IP address of the most recent connection done with this
|
||||
\fBcurl\fP handle. This string may be IPv6 when that is enabled. Note that you
|
||||
get a pointer to a memory area that is reused at next request so you need to
|
||||
copy the string if you want to keep the information.
|
||||
|
||||
The \fBip\fP pointer is NULL or points to private memory. You MUST NOT free -
|
||||
it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
All network based ones
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
char *ip;
|
||||
CURLcode res;
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the transfer */
|
||||
res = curl_easy_perform(curl);
|
||||
/* Check for errors */
|
||||
if((res == CURLE_OK) &&
|
||||
!curl_easy_getinfo(curl, CURLINFO_PRIMARY_IP, &ip) && ip) {
|
||||
printf("IP: %s\\n", ip);
|
||||
}
|
||||
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.19.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_LOCAL_IP (3),
|
||||
.BR CURLINFO_LOCAL_PORT (3),
|
||||
.BR CURLINFO_PRIMARY_PORT (3)
|
71
deps/curl/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3
vendored
Normal file
71
deps/curl/docs/libcurl/opts/CURLINFO_PRIMARY_PORT.3
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PRIMARY_PORT 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PRIMARY_PORT \- get the latest destination port number
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIMARY_PORT, long *portp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the destination port of the most recent
|
||||
connection done with this \fBcurl\fP handle.
|
||||
|
||||
This is the destination port of the actual TCP or UDP connection libcurl used.
|
||||
If a proxy was used for the most recent transfer, this is the port number of
|
||||
the proxy, if no proxy was used it is the port number of the most recently
|
||||
accessed URL.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long port;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PRIMARY_PORT, &port);
|
||||
if(!res)
|
||||
printf("Connected to remote port: %ld\\n", port);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.21.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_LOCAL_PORT (3),
|
||||
.BR CURLINFO_PRIMARY_IP (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_PRIVATE.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_PRIVATE.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PRIVATE 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PRIVATE \- get the private pointer
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PRIVATE, char **private);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to the private data
|
||||
associated with the curl handle (set with the \fICURLOPT_PRIVATE(3)\fP).
|
||||
Please note that for internal reasons, the value is returned as a char
|
||||
pointer, although effectively being a 'void *'.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
void *pointer = (void *)0x2345454;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
|
||||
|
||||
/* set the private pointer */
|
||||
curl_easy_setopt(curl, CURLOPT_PRIVATE, pointer);
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
/* extract the private pointer again */
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PRIVATE, &pointer);
|
||||
|
||||
if(res)
|
||||
printf("error: %s\\n", curl_easy_strerror(res));
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.10.3
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_PRIVATE (3)
|
76
deps/curl/docs/libcurl/opts/CURLINFO_PROTOCOL.3
vendored
Normal file
76
deps/curl/docs/libcurl/opts/CURLINFO_PROTOCOL.3
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PROTOCOL 3 "23 November 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PROTOCOL \- get the protocol used in the connection
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROTOCOL, long *p);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This option is deprecated. We strongly recommend using
|
||||
\fICURLINFO_SCHEME(3)\fP instead, because this option cannot return all
|
||||
possible protocols!
|
||||
|
||||
Pass a pointer to a long to receive the version used in the last http
|
||||
connection. The returned value is set to one of the CURLPROTO_* values:
|
||||
|
||||
.nf
|
||||
CURLPROTO_DICT, CURLPROTO_FILE, CURLPROTO_FTP, CURLPROTO_FTPS,
|
||||
CURLPROTO_GOPHER, CURLPROTO_HTTP, CURLPROTO_HTTPS, CURLPROTO_IMAP,
|
||||
CURLPROTO_IMAPS, CURLPROTO_LDAP, CURLPROTO_LDAPS, CURLPROTO_POP3,
|
||||
CURLPROTO_POP3S, CURLPROTO_RTMP, CURLPROTO_RTMPE, CURLPROTO_RTMPS,
|
||||
CURLPROTO_RTMPT, CURLPROTO_RTMPTE, CURLPROTO_RTMPTS, CURLPROTO_RTSP,
|
||||
CURLPROTO_SCP, CURLPROTO_SFTP, CURLPROTO_SMB, CURLPROTO_SMBS, CURLPROTO_SMTP,
|
||||
CURLPROTO_SMTPS, CURLPROTO_TELNET, CURLPROTO_TFTP, CURLPROTO_MQTT
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long protocol;
|
||||
curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.52.0. Deprecated since 7.85.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RESPONSE_CODE (3)
|
82
deps/curl/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3
vendored
Normal file
82
deps/curl/docs/libcurl/opts/CURLINFO_PROXYAUTH_AVAIL.3
vendored
Normal file
@ -0,0 +1,82 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PROXYAUTH_AVAIL 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PROXYAUTH_AVAIL \- get available HTTP proxy authentication methods
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXYAUTH_AVAIL,
|
||||
long *authp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive a bitmask indicating the authentication
|
||||
method(s) available according to the previous response. The meaning of the
|
||||
bits is explained in the \fICURLOPT_PROXYAUTH(3)\fP option for
|
||||
\fIcurl_easy_setopt(3)\fP.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "http://127.0.0.1:80");
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* extract the available proxy authentication types */
|
||||
long auth;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PROXYAUTH_AVAIL, &auth);
|
||||
if(!res) {
|
||||
if(!auth)
|
||||
printf("No proxy auth available, perhaps no 407?\\n");
|
||||
else {
|
||||
printf("%s%s%s%s\\n",
|
||||
auth & CURLAUTH_BASIC ? "Basic ":"",
|
||||
auth & CURLAUTH_DIGEST ? "Digest ":"",
|
||||
auth & CURLAUTH_NEGOTIATE ? "Negotiate ":"",
|
||||
auth % CURLAUTH_NTLM ? "NTLM ":"");
|
||||
}
|
||||
}
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added RFC 2617 in 7.10.8
|
||||
Added RFC 7616 in 7.57.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_HTTPAUTH_AVAIL (3)
|
109
deps/curl/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3
vendored
Normal file
109
deps/curl/docs/libcurl/opts/CURLINFO_PROXY_ERROR.3
vendored
Normal file
@ -0,0 +1,109 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PROXY_ERROR 3 "3 Aug 2020" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PROXY_ERROR \- get the detailed (SOCKS) proxy error
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
typedef enum {
|
||||
CURLPX_OK,
|
||||
CURLPX_BAD_ADDRESS_TYPE,
|
||||
CURLPX_BAD_VERSION,
|
||||
CURLPX_CLOSED,
|
||||
CURLPX_GSSAPI,
|
||||
CURLPX_GSSAPI_PERMSG,
|
||||
CURLPX_GSSAPI_PROTECTION,
|
||||
CURLPX_IDENTD,
|
||||
CURLPX_IDENTD_DIFFER,
|
||||
CURLPX_LONG_HOSTNAME,
|
||||
CURLPX_LONG_PASSWD,
|
||||
CURLPX_LONG_USER,
|
||||
CURLPX_NO_AUTH,
|
||||
CURLPX_RECV_ADDRESS,
|
||||
CURLPX_RECV_AUTH,
|
||||
CURLPX_RECV_CONNECT,
|
||||
CURLPX_RECV_REQACK,
|
||||
CURLPX_REPLY_ADDRESS_TYPE_NOT_SUPPORTED,
|
||||
CURLPX_REPLY_COMMAND_NOT_SUPPORTED,
|
||||
CURLPX_REPLY_CONNECTION_REFUSED,
|
||||
CURLPX_REPLY_GENERAL_SERVER_FAILURE,
|
||||
CURLPX_REPLY_HOST_UNREACHABLE,
|
||||
CURLPX_REPLY_NETWORK_UNREACHABLE,
|
||||
CURLPX_REPLY_NOT_ALLOWED,
|
||||
CURLPX_REPLY_TTL_EXPIRED,
|
||||
CURLPX_REPLY_UNASSIGNED,
|
||||
CURLPX_REQUEST_FAILED,
|
||||
CURLPX_RESOLVE_HOST,
|
||||
CURLPX_SEND_AUTH,
|
||||
CURLPX_SEND_CONNECT,
|
||||
CURLPX_SEND_REQUEST,
|
||||
CURLPX_UNKNOWN_FAIL,
|
||||
CURLPX_UNKNOWN_MODE,
|
||||
CURLPX_USER_REJECTED,
|
||||
CURLPX_LAST /* never use */
|
||||
} CURLproxycode;
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_ERROR, long *detail);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive a detailed error code when the most recent
|
||||
transfer returned a \fBCURLE_PROXY\fP error. That error code matches the
|
||||
\fBCURLproxycode\fP set.
|
||||
|
||||
The error code is zero (\fBCURLPX_OK\fP) if no response code was available.
|
||||
.SH PROTOCOLS
|
||||
All that can be done over SOCKS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "socks5://127.0.0.1");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_PROXY) {
|
||||
long proxycode;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_PROXY_ERROR, &proxycode);
|
||||
if(!res && proxycode)
|
||||
printf("The detailed proxy error: %ld\\n", proxycode);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.73.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RESPONSE_CODE (3),
|
||||
.BR libcurl-errors (3)
|
68
deps/curl/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3
vendored
Normal file
68
deps/curl/docs/libcurl/opts/CURLINFO_PROXY_SSL_VERIFYRESULT.3
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_PROXY_SSL_VERIFYRESULT 3 "16 Nov 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_PROXY_SSL_VERIFYRESULT \- get the result of the proxy certificate verification
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_PROXY_SSL_VERIFYRESULT,
|
||||
long *result);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the result of the certificate verification
|
||||
that was requested (using the \fICURLOPT_PROXY_SSL_VERIFYPEER(3)\fP
|
||||
option. This is only used for HTTPS proxies.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
long verifyresult;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_PROXY, "https://proxy:443");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res)
|
||||
printf("error: %s\\n", curl_easy_strerror(res));
|
||||
curl_easy_getinfo(curl, CURLINFO_PROXY_SSL_VERIFYRESULT, &verifyresult);
|
||||
printf("The peer verification said %s\\n", verifyresult?
|
||||
"fine" : "bad");
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.52.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SSL_VERIFYRESULT (3)
|
66
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3
vendored
Normal file
66
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_COUNT.3
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REDIRECT_COUNT 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REDIRECT_COUNT \- get the number of redirects
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_COUNT,
|
||||
long *countp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the total number of redirections that were
|
||||
actually followed.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long redirects;
|
||||
curl_easy_getinfo(curl, CURLINFO_REDIRECT_COUNT, &redirects);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.9.7
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_REDIRECT_URL (3),
|
||||
.BR CURLOPT_FOLLOWLOCATION (3)
|
74
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_TIME.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REDIRECT_TIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REDIRECT_TIME \- get the time for all redirection steps
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME,
|
||||
double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total time, in seconds, it took for
|
||||
all redirection steps include name lookup, connect, pretransfer and transfer
|
||||
before final transaction was started. \fICURLINFO_REDIRECT_TIME(3)\fP contains
|
||||
the complete execution time for multiple redirections.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double redirect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME, &redirect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", redirect);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.9.7
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_REDIRECT_COUNT (3),
|
||||
.BR CURLINFO_REDIRECT_TIME_T (3),
|
||||
.BR CURLINFO_REDIRECT_URL (3)
|
76
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3
vendored
Normal file
76
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_TIME_T.3
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REDIRECT_TIME_T 3 "28 Apr 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REDIRECT_TIME_T \- get the time for all redirection steps
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the total time, in microseconds, it
|
||||
took for all redirection steps include name lookup, connect, pretransfer and
|
||||
transfer before final transaction was started.
|
||||
\fICURLINFO_REDIRECT_TIME_T(3)\fP holds the complete execution time for
|
||||
multiple redirections.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t redirect;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_REDIRECT_TIME_T, &redirect);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", redirect / 1000000,
|
||||
(long)(redirect % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_REDIRECT_COUNT (3),
|
||||
.BR CURLINFO_REDIRECT_TIME (3),
|
||||
.BR CURLINFO_REDIRECT_URL (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_REDIRECT_URL.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REDIRECT_URL 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REDIRECT_URL \- get the URL a redirect would go to
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REDIRECT_URL, char **urlp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the URL a redirect \fIwould\fP
|
||||
take you to if you would enable \fICURLOPT_FOLLOWLOCATION(3)\fP. This can come
|
||||
handy if you think using the built-in libcurl redirect logic is not good enough
|
||||
for you but you would still prefer to avoid implementing all the magic of
|
||||
figuring out the new URL.
|
||||
|
||||
This URL is also set if the \fICURLOPT_MAXREDIRS(3)\fP limit prevented a
|
||||
redirect to happen (since 7.54.1).
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *url = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_REDIRECT_URL, &url);
|
||||
if(url)
|
||||
printf("Redirect to: %s\\n", url);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.18.2
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_REDIRECT_COUNT (3),
|
||||
.BR CURLINFO_REDIRECT_TIME_T (3),
|
||||
.BR CURLOPT_FOLLOWLOCATION (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_REFERER.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_REFERER.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REFERER 3 "11 Feb 2021" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REFERER \- get the referrer header
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REFERER, char **hdrp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass in a pointer to a char pointer and get the referrer header.
|
||||
|
||||
The \fBhdrp\fP pointer is NULL or points to private memory you MUST NOT free -
|
||||
it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_REFERER, "https://example.org/referrer");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *hdr = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_REFERER, &hdr);
|
||||
if(hdr)
|
||||
printf("Referrer header: %s\\n", hdr);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.76.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_header (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_REFERER (3)
|
67
deps/curl/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3
vendored
Normal file
67
deps/curl/docs/libcurl/opts/CURLINFO_REQUEST_SIZE.3
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_REQUEST_SIZE 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_REQUEST_SIZE \- get size of sent request
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_REQUEST_SIZE, long *sizep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the total size of the issued
|
||||
requests. This is so far only for HTTP requests. Note that this may be more
|
||||
than one request if \fICURLOPT_FOLLOWLOCATION(3)\fP is enabled.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long req;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &req);
|
||||
if(!res)
|
||||
printf("Request size: %ld bytes\\n", req);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_HEADER_SIZE (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD_T (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_RESPONSE_CODE.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RESPONSE_CODE 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RESPONSE_CODE \- get the last response code
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RESPONSE_CODE, long *codep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the last received HTTP, FTP, SMTP or LDAP
|
||||
(OpenLDAP only) response code. This option was previously known as
|
||||
CURLINFO_HTTP_CODE in libcurl 7.10.7 and earlier. The stored value is zero if
|
||||
no server response code has been received.
|
||||
|
||||
Note that a proxy's CONNECT response should be read with
|
||||
\fICURLINFO_HTTP_CONNECTCODE(3)\fP and not this.
|
||||
.SH PROTOCOLS
|
||||
HTTP, FTP, SMTP and LDAP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long response_code;
|
||||
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response_code);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.10.8. CURLINFO_HTTP_CODE was added in 7.4.1.
|
||||
Support for SMTP responses added in 7.25.0, for OpenLDAP in 7.81.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_HTTP_CONNECTCODE (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_RETRY_AFTER.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RETRY_AFTER 3 "6 Aug 2019" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RETRY_AFTER \- returns the Retry-After retry delay
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RETRY_AFTER,
|
||||
curl_off_t *retry);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t variable to receive the number of seconds the
|
||||
HTTP server suggests the client should wait until the next request is
|
||||
issued. The information from the "Retry-After:" header.
|
||||
|
||||
While the HTTP header might contain a fixed date string, the
|
||||
\fICURLINFO_RETRY_AFTER(3)\fP always returns the number of seconds to wait -
|
||||
or zero if there was no header or the header could not be parsed.
|
||||
.SH DEFAULT
|
||||
Returns zero delay if there was no header.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
curl_off_t wait = 0;
|
||||
curl_easy_getinfo(curl, CURLINFO_RETRY_AFTER, &wait);
|
||||
if(wait)
|
||||
printf("Wait for %" CURL_FORMAT_CURL_OFF_T " seconds\\n", wait);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.66.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_header (3),
|
||||
.BR CURLOPT_HEADERFUNCTION (3),
|
||||
.BR CURLOPT_STDERR (3)
|
65
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3
vendored
Normal file
65
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_CLIENT_CSEQ.3
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RTSP_CLIENT_CSEQ 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RTSP_CLIENT_CSEQ \- get the next RTSP client CSeq
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CLIENT_CSEQ,
|
||||
long *cseq);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the next CSeq that is expected to be used
|
||||
by the application.
|
||||
.SH PROTOCOLS
|
||||
RTSP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long cseq;
|
||||
curl_easy_getinfo(curl, CURLINFO_RTSP_CLIENT_CSEQ, &cseq);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.20.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RTSP_CSEQ_RECV (3),
|
||||
.BR CURLINFO_RTSP_SERVER_CSEQ (3)
|
65
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3
vendored
Normal file
65
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_CSEQ_RECV.3
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RTSP_CSEQ_RECV 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RTSP_CSEQ_RECV \- get the recently received CSeq
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_CSEQ_RECV, long *cseq);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the most recently received CSeq from the
|
||||
server. If your application encounters a \fICURLE_RTSP_CSEQ_ERROR\fP then you
|
||||
may wish to troubleshoot and/or fix the CSeq mismatch by peeking at this
|
||||
value.
|
||||
.SH PROTOCOLS
|
||||
RTSP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long cseq;
|
||||
curl_easy_getinfo(curl, CURLINFO_RTSP_CSEQ_RECV, &cseq);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.20.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RTSP_SERVER_CSEQ (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_SERVER_CSEQ.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RTSP_SERVER_CSEQ 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RTSP_SERVER_CSEQ \- get the next RTSP server CSeq
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SERVER_CSEQ,
|
||||
long *cseq);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the next CSeq that is expected to be used
|
||||
by the application.
|
||||
|
||||
Listening for server initiated requests is not implemented!
|
||||
|
||||
Applications wishing to resume an RTSP session on another connection should
|
||||
retrieve this info before closing the active connection.
|
||||
.SH PROTOCOLS
|
||||
RTSP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
long cseq;
|
||||
curl_easy_getinfo(curl, CURLINFO_RTSP_SERVER_CSEQ, &cseq);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.20.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RTSP_CSEQ_RECV (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_RTSP_SESSION_ID.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_RTSP_SESSION_ID 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_RTSP_SESSION_ID \- get RTSP session ID
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_RTSP_SESSION_ID, char **id);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive a pointer to a string holding the
|
||||
most recent RTSP Session ID.
|
||||
|
||||
Applications wishing to resume an RTSP session on another connection should
|
||||
retrieve this info before closing the active connection.
|
||||
|
||||
The \fBid\fP pointer is NULL or points to private memory. You MUST NOT free -
|
||||
it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the corresponding
|
||||
CURL handle.
|
||||
.SH PROTOCOLS
|
||||
RTSP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "rtsp://rtsp.example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *id;
|
||||
curl_easy_getinfo(curl, CURLINFO_RTSP_SESSION_ID, &id);
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.20.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_RTSP_CSEQ_RECV (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_SCHEME.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_SCHEME.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SCHEME 3 "23 November 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SCHEME \- get the URL scheme (sometimes called protocol) used in the connection
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SCHEME, char **scheme);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a char pointer to receive the pointer to a null-terminated
|
||||
string holding the URL scheme used for the most recent connection done with
|
||||
this CURL \fBhandle\fP.
|
||||
|
||||
The \fBscheme\fP pointer is NULL or points to private memory. You MUST NOT
|
||||
free - it gets freed when you call \fIcurl_easy_cleanup(3)\fP on the
|
||||
corresponding CURL handle.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res == CURLE_OK) {
|
||||
char *scheme = NULL;
|
||||
curl_easy_getinfo(curl, CURLINFO_SCHEME, &scheme);
|
||||
if(scheme)
|
||||
printf("scheme: %s\\n", scheme); /* scheme: HTTP */
|
||||
}
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.52.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_EFFECTIVE_URL (3),
|
||||
.BR CURLINFO_PROTOCOL (3),
|
||||
.BR CURLINFO_RESPONSE_CODE (3)
|
77
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3
vendored
Normal file
77
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD.3
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SIZE_DOWNLOAD 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SIZE_DOWNLOAD \- get the number of downloaded bytes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD, double *dlp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total amount of bytes that were
|
||||
downloaded. The amount is only for the latest transfer and gets reset again
|
||||
for each new transfer. This counts actual payload data, what's also commonly
|
||||
called body. All meta and header data is excluded and not included in this
|
||||
number.
|
||||
|
||||
\fICURLINFO_SIZE_DOWNLOAD_T(3)\fP is a newer replacement that returns a more
|
||||
sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
double dl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD, &dl);
|
||||
if(!res) {
|
||||
printf("Downloaded %.0f bytes\\n", dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD_T (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD_T (3),
|
||||
.BR CURLOPT_MAXFILESIZE (3)
|
74
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_DOWNLOAD_T.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SIZE_DOWNLOAD_T 3 "25 May 2017" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SIZE_DOWNLOAD_T \- get the number of downloaded bytes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_DOWNLOAD_T,
|
||||
curl_off_t *dlp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the total amount of bytes that
|
||||
were downloaded. The amount is only for the latest transfer and gets reset
|
||||
again for each new transfer. This counts actual payload data, what's also
|
||||
commonly called body. All meta and header data is excluded from this amount.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
/* check the size */
|
||||
curl_off_t dl;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SIZE_DOWNLOAD_T, &dl);
|
||||
if(!res) {
|
||||
printf("Downloaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", dl);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD_T (3),
|
||||
.BR CURLOPT_MAXFILESIZE (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SIZE_UPLOAD 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SIZE_UPLOAD \- get the number of uploaded bytes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD,
|
||||
double *uploadp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total amount of bytes that were
|
||||
uploaded.
|
||||
|
||||
\fICURLINFO_SIZE_UPLOAD_T(3)\fP is a newer replacement that returns a more
|
||||
sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
double ul;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD, &ul);
|
||||
if(!res) {
|
||||
printf("Uploaded %.0f bytes\\n", ul);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD_T (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD_T (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_SIZE_UPLOAD_T.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SIZE_UPLOAD_T 3 "25 May 2017" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SIZE_UPLOAD_T \- get the number of uploaded bytes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SIZE_UPLOAD_T,
|
||||
curl_off_t *uploadp);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the total amount of bytes that
|
||||
were uploaded.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
curl_off_t ul;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SIZE_UPLOAD_T, &ul);
|
||||
if(!res) {
|
||||
printf("Uploaded %" CURL_FORMAT_CURL_OFF_T " bytes\\n", ul);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_DOWNLOAD_T (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD (3)
|
72
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SPEED_DOWNLOAD 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SPEED_DOWNLOAD \- get download speed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD,
|
||||
double *speed);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the average download speed that curl
|
||||
measured for the complete download. Measured in bytes/second.
|
||||
|
||||
\fICURLINFO_SPEED_DOWNLOAD_T(3)\fP is a newer replacement that returns a more
|
||||
sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
double speed;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD, &speed);
|
||||
if(!res) {
|
||||
printf("Download speed %.0f bytes/sec\\n", speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD_T (3),
|
||||
.BR CURLINFO_SPEED_UPLOAD (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_DOWNLOAD_T.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SPEED_DOWNLOAD_T 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SPEED_DOWNLOAD_T \- get download speed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_DOWNLOAD_T,
|
||||
curl_off_t *speed);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the average download speed
|
||||
that curl measured for the complete download. Measured in bytes/second.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
curl_off_t speed;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SPEED_DOWNLOAD_T, &speed);
|
||||
if(!res) {
|
||||
printf("Download speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n",
|
||||
speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SIZE_UPLOAD_T (3),
|
||||
.BR CURLINFO_SPEED_UPLOAD_T (3)
|
70
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3
vendored
Normal file
70
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD.3
vendored
Normal file
@ -0,0 +1,70 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SPEED_UPLOAD 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SPEED_UPLOAD \- get upload speed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD, double *speed);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the average upload speed that curl
|
||||
measured for the complete upload. Measured in bytes/second.
|
||||
|
||||
\fICURLINFO_SPEED_UPLOAD_T(3)\fP is a newer replacement that returns a more
|
||||
sensible variable type.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
double speed;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed);
|
||||
if(!res) {
|
||||
printf("Upload speed %.0f bytes/sec\\n", speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1. Deprecated since 7.55.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SPEED_DOWNLOAD_T (3)
|
68
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
vendored
Normal file
68
deps/curl/docs/libcurl/opts/CURLINFO_SPEED_UPLOAD_T.3
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SPEED_UPLOAD_T 3 "25 May 2017" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SPEED_UPLOAD_T \- get upload speed
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SPEED_UPLOAD_T,
|
||||
curl_off_t *speed);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the average upload speed that
|
||||
curl measured for the complete upload. Measured in bytes/second.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
curl_off_t speed;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD_T, &speed);
|
||||
if(!res) {
|
||||
printf("Upload speed %" CURL_FORMAT_CURL_OFF_T " bytes/sec\\n", speed);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.55.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_SPEED_DOWNLOAD_T (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_SSL_ENGINES.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SSL_ENGINES 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SSL_ENGINES \- get an slist of OpenSSL crypto-engines
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_ENGINES,
|
||||
struct curl_slist **engine_list);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass the address of a 'struct curl_slist *' to receive a linked-list of
|
||||
OpenSSL crypto-engines supported. Note that engines are normally implemented
|
||||
in separate dynamic libraries. Hence not all the returned engines may be
|
||||
available at runtime. \fBNOTE:\fP you must call \fIcurl_slist_free_all(3)\fP
|
||||
on the list pointer once you are done with it, as libcurl does not free this
|
||||
data for you.
|
||||
.SH PROTOCOLS
|
||||
All TLS based ones.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
struct curl_slist *engines;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_SSL_ENGINES, &engines);
|
||||
if((res == CURLE_OK) && engines) {
|
||||
/* we have a list, free it when done using it */
|
||||
curl_slist_free_all(engines);
|
||||
}
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.12.3. Available in OpenSSL builds with "engine" support.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLOPT_SSLENGINE (3)
|
69
deps/curl/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3
vendored
Normal file
69
deps/curl/docs/libcurl/opts/CURLINFO_SSL_VERIFYRESULT.3
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_SSL_VERIFYRESULT 3 "1 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_SSL_VERIFYRESULT \- get the result of the certificate verification
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_SSL_VERIFYRESULT,
|
||||
long *result);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a long to receive the result of the server SSL certificate
|
||||
verification that was requested (using the \fICURLOPT_SSL_VERIFYPEER(3)\fP
|
||||
option).
|
||||
|
||||
0 is a positive result. Non-zero is an error.
|
||||
.SH PROTOCOLS
|
||||
All using TLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
long verifyresult;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res)
|
||||
printf("error: %s\\n", curl_easy_strerror(res));
|
||||
curl_easy_getinfo(curl, CURLINFO_SSL_VERIFYRESULT, &verifyresult);
|
||||
printf("The peer verification said %s\\n", verifyresult?
|
||||
"BAAAD":"fine");
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.5. Only set by the OpenSSL/libressl/boringssl and GnuTLS backends.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_PROXY_SSL_VERIFYRESULT (3)
|
75
deps/curl/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_STARTTRANSFER_TIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_STARTTRANSFER_TIME \- get the time until the first byte is received
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_STARTTRANSFER_TIME,
|
||||
double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the time, in seconds, it took from the
|
||||
start until the first byte is received by libcurl. This includes
|
||||
\fICURLINFO_PRETRANSFER_TIME(3)\fP and also the time the server needs to
|
||||
calculate the result.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double start;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME, &start);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", start);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.9.2
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_STARTTRANSFER_TIME_T (3),
|
||||
.BR CURLOPT_TIMEOUT (3)
|
77
deps/curl/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3
vendored
Normal file
77
deps/curl/docs/libcurl/opts/CURLINFO_STARTTRANSFER_TIME_T.3
vendored
Normal file
@ -0,0 +1,77 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_STARTTRANSFER_TIME_T 3 "28 Apr 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_STARTTRANSFER_TIME_T \- get the time until the first byte is received
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_STARTTRANSFER_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the time, in microseconds,
|
||||
it took from the
|
||||
start until the first byte is received by libcurl. This includes
|
||||
\fICURLINFO_PRETRANSFER_TIME_T(3)\fP and also the time the server needs to
|
||||
calculate the result.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t start;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_STARTTRANSFER_TIME_T, &start);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", start / 1000000,
|
||||
(long)(start % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_STARTTRANSFER_TIME (3),
|
||||
.BR CURLOPT_TIMEOUT (3)
|
78
deps/curl/docs/libcurl/opts/CURLINFO_TLS_SESSION.3
vendored
Normal file
78
deps/curl/docs/libcurl/opts/CURLINFO_TLS_SESSION.3
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_TLS_SESSION 3 "12 Sep 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_TLS_SESSION \- get TLS session info
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SESSION,
|
||||
struct curl_tlssessioninfo **session);
|
||||
.SH DESCRIPTION
|
||||
\fBThis option has been superseded\fP by \fICURLINFO_TLS_SSL_PTR(3)\fP which
|
||||
was added in 7.48.0. The only reason you would use this option instead is if
|
||||
you could be using a version of libcurl earlier than 7.48.0.
|
||||
|
||||
This option is exactly the same as \fICURLINFO_TLS_SSL_PTR(3)\fP except in the
|
||||
case of OpenSSL. If the session \fIbackend\fP is CURLSSLBACKEND_OPENSSL the
|
||||
session \fIinternals\fP pointer varies depending on the option:
|
||||
|
||||
\fICURLINFO_TLS_SESSION(3)\fP OpenSSL session \fIinternals\fP is \fBSSL_CTX *\fP.
|
||||
|
||||
\fICURLINFO_TLS_SSL_PTR(3)\fP OpenSSL session \fIinternals\fP is \fBSSL *\fP.
|
||||
|
||||
You can obtain an \fBSSL_CTX\fP pointer from an SSL pointer using OpenSSL
|
||||
function \fISSL_get_SSL_CTX(3)\fP. Therefore unless you need compatibility
|
||||
with older versions of libcurl use \fICURLINFO_TLS_SSL_PTR(3)\fP. Refer to
|
||||
that document for more information.
|
||||
.SH PROTOCOLS
|
||||
All TLS-based
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
struct curl_tlssessioninfo *tls;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(res)
|
||||
printf("error: %s\\n", curl_easy_strerror(res));
|
||||
curl_easy_getinfo(curl, CURLINFO_TLS_SESSION, &tls);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.34.0. Deprecated since 7.48.0 and supported OpenSSL, GnuTLS, and
|
||||
NSS only up until this version was released.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_TLS_SSL_PTR (3)
|
165
deps/curl/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3
vendored
Normal file
165
deps/curl/docs/libcurl/opts/CURLINFO_TLS_SSL_PTR.3
vendored
Normal file
@ -0,0 +1,165 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_TLS_SSL_PTR 3 "23 Feb 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_TLS_SESSION, CURLINFO_TLS_SSL_PTR \- get TLS session info
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SSL_PTR,
|
||||
struct curl_tlssessioninfo **session);
|
||||
|
||||
/* if you need compatibility with libcurl < 7.48.0 use
|
||||
CURLINFO_TLS_SESSION instead: */
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TLS_SESSION,
|
||||
struct curl_tlssessioninfo **session);
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIstruct curl_tlssessioninfo *\fP. The pointer is
|
||||
initialized to refer to a \fIstruct curl_tlssessioninfo *\fP that contains an
|
||||
enum indicating the SSL library used for the handshake and a pointer to the
|
||||
respective internal TLS session structure of this underlying SSL library.
|
||||
|
||||
This option may be useful for example to extract certificate information in a
|
||||
format convenient for further processing, such as manual validation. Refer to
|
||||
the \fBLIMITATIONS\fP section.
|
||||
|
||||
.nf
|
||||
struct curl_tlssessioninfo {
|
||||
curl_sslbackend backend;
|
||||
void *internals;
|
||||
};
|
||||
.fi
|
||||
|
||||
The \fIbackend\fP struct member is one of the defines in the CURLSSLBACKEND_*
|
||||
series: CURLSSLBACKEND_NONE (when built without TLS support),
|
||||
CURLSSLBACKEND_WOLFSSL, CURLSSLBACKEND_SECURETRANSPORT, CURLSSLBACKEND_GNUTLS,
|
||||
CURLSSLBACKEND_MBEDTLS, CURLSSLBACKEND_NSS, CURLSSLBACKEND_OPENSSL,
|
||||
CURLSSLBACKEND_SCHANNEL or CURLSSLBACKEND_MESALINK. (Note that the OpenSSL
|
||||
forks are all reported as just OpenSSL here.)
|
||||
|
||||
The \fIinternals\fP struct member points to a TLS library specific pointer for
|
||||
the active ("in use") SSL connection, with the following underlying types:
|
||||
.RS
|
||||
.IP GnuTLS
|
||||
\fBgnutls_session_t\fP
|
||||
.IP NSS
|
||||
\fBPRFileDesc *\fP
|
||||
.IP OpenSSL
|
||||
\fICURLINFO_TLS_SESSION(3)\fP: \fBSSL_CTX *\fP
|
||||
|
||||
\fICURLINFO_TLS_SSL_PTR(3)\fP: \fBSSL *\fP
|
||||
.RE
|
||||
Since 7.48.0 the \fIinternals\fP member can point to these other SSL backends
|
||||
as well:
|
||||
.RS
|
||||
.IP mbedTLS
|
||||
\fBmbedTLS_ssl_context *\fP
|
||||
.IP "Secure Channel"
|
||||
\fBCtxtHandle *\fP
|
||||
.IP "Secure Transport"
|
||||
\fBSSLContext *\fP
|
||||
.IP "wolfSSL"
|
||||
\fBSSL *\fP
|
||||
.RE
|
||||
|
||||
If the \fIinternals\fP pointer is NULL then either the SSL backend is not
|
||||
supported, an SSL session has not yet been established or the connection is no
|
||||
longer associated with the easy handle (e.g. \fIcurl_easy_perform(3)\fP has
|
||||
returned).
|
||||
.SH LIMITATIONS
|
||||
This option has some limitations that could make it unsafe when it comes to
|
||||
the manual verification of certificates.
|
||||
|
||||
This option only retrieves the first in-use SSL session pointer for your easy
|
||||
handle, however your easy handle may have more than one in-use SSL session if
|
||||
using FTP over SSL. That is because the FTP protocol has a control channel and
|
||||
a data channel and one or both may be over SSL. Currently there is no way to
|
||||
retrieve a second in-use SSL session associated with an easy handle.
|
||||
|
||||
This option has not been thoroughly tested with clear text protocols that can
|
||||
be upgraded/downgraded to/from SSL: FTP, SMTP, POP3, IMAP when used with
|
||||
\fICURLOPT_USE_SSL(3)\fP. Though you can to retrieve the SSL pointer, it's
|
||||
possible that before you can do that, data (including auth) may have already
|
||||
been sent over a connection after it was upgraded.
|
||||
|
||||
Renegotiation. If unsafe renegotiation or renegotiation in a way that the
|
||||
certificate is allowed to change is allowed by your SSL library this may occur
|
||||
and the certificate may change, and data may continue to be sent or received
|
||||
after renegotiation but before you are able to get the (possibly) changed SSL
|
||||
pointer, with the (possibly) changed certificate information.
|
||||
|
||||
Instead of using this option to poll for certificate changes use
|
||||
\fICURLOPT_SSL_CTX_FUNCTION(3)\fP to set a verification callback, if supported.
|
||||
That is safer and does not suffer from any of the problems above.
|
||||
|
||||
How are you using this option? Are you affected by any of these limitations?
|
||||
Please let us know by making a comment at
|
||||
https://github.com/curl/curl/issues/685
|
||||
.SH PROTOCOLS
|
||||
All TLS-based
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
#include <openssl/ssl.h>
|
||||
|
||||
CURL *curl;
|
||||
static size_t wf(void *ptr, size_t size, size_t nmemb, void *stream)
|
||||
{
|
||||
const struct curl_tlssessioninfo *info = NULL;
|
||||
CURLcode res = curl_easy_getinfo(curl, CURLINFO_TLS_SSL_PTR, &info);
|
||||
if(info && !res) {
|
||||
if(CURLSSLBACKEND_OPENSSL == info->backend) {
|
||||
printf("OpenSSL ver. %s\\n", SSL_get_version((SSL*)info->internals));
|
||||
}
|
||||
}
|
||||
return size * nmemb;
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
CURLcode res;
|
||||
curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, wf);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.48.0.
|
||||
|
||||
This option supersedes \fICURLINFO_TLS_SESSION(3)\fP which was added in 7.34.0.
|
||||
This option is exactly the same as that option except in the case of OpenSSL.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_TLS_SESSION (3)
|
73
deps/curl/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLINFO_TOTAL_TIME.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_TOTAL_TIME 3 "28 Aug 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_TOTAL_TIME \- get total time of previous transfer
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TOTAL_TIME, double *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a double to receive the total time in seconds for the
|
||||
previous transfer, including name resolving, TCP connect etc. The double
|
||||
represents the time in seconds, including fractions.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
double total;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %.1f", total);
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.4.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_TOTAL_TIME_T (3),
|
||||
.BR CURLOPT_TIMEOUT (3)
|
75
deps/curl/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLINFO_TOTAL_TIME_T.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_TOTAL_TIME_T 3 "28 Apr 2018" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLINFO_TOTAL_TIME_T \- get total time of previous transfer in microseconds
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_TOTAL_TIME_T,
|
||||
curl_off_t *timep);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_off_t to receive the total time in microseconds
|
||||
for the previous transfer, including name resolving, TCP connect etc.
|
||||
The curl_off_t represents the time in microseconds.
|
||||
|
||||
When a redirect is followed, the time from each request is added together.
|
||||
|
||||
See also the TIMES overview in the \fIcurl_easy_getinfo(3)\fP man page.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_off_t total;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
res = curl_easy_perform(curl);
|
||||
if(CURLE_OK == res) {
|
||||
res = curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME_T, &total);
|
||||
if(CURLE_OK == res) {
|
||||
printf("Time: %" CURL_FORMAT_CURL_OFF_T ".%06ld", total / 1000000,
|
||||
(long)(total % 1000000));
|
||||
}
|
||||
}
|
||||
/* always cleanup */
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.61.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_TOTAL_TIME (3),
|
||||
.BR CURLOPT_TIMEOUT (3)
|
75
deps/curl/docs/libcurl/opts/CURLINFO_XFER_ID.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLINFO_XFER_ID.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLINFO_XFER_ID 3 "07 June 2023" "libcurl" "libcurl"
|
||||
.SH NAME
|
||||
CURLINFO_XFER_ID \- get the ID of a transfer
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_XFER_ID,
|
||||
curl_off_t *xfer_id);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a \fIcurl_off_t\fP to receive the identifier of the
|
||||
current/last transfer done with the handle. Stores -1 if no transfer
|
||||
has been started yet for the handle.
|
||||
|
||||
The transfer id is unique among all transfers performed using the same
|
||||
connection cache. This is implicitly the case for all transfers in the
|
||||
same multi handle.
|
||||
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* Perform the request */
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
if(!res) {
|
||||
curl_off_t xfer_id;
|
||||
res = curl_easy_getinfo(curl, CURLINFO_XFER_ID, &xfer_id);
|
||||
if(!res) {
|
||||
printf("Transfer ID: %" CURL_FORMAT_CURL_OFF_T "\\n", xfer_id);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 8.2.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_easy_getinfo (3),
|
||||
.BR curl_easy_setopt (3),
|
||||
.BR CURLINFO_CONN_ID (3)
|
63
deps/curl/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
vendored
Normal file
63
deps/curl/docs/libcurl/opts/CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE.3
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE \- chunk length threshold for pipelining
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE,
|
||||
long size);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
No function since pipelining was removed in 7.62.0.
|
||||
|
||||
Pass a long with a \fBsize\fP in bytes. If a transfer in a pipeline is
|
||||
currently processing a chunked (Transfer-encoding: chunked) request with a
|
||||
current chunk length larger than \fICURLMOPT_CHUNK_LENGTH_PENALTY_SIZE(3)\fP,
|
||||
that pipeline is not considered for additional requests, even if it is shorter
|
||||
than \fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that the penalization is inactive.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
long maxchunk = 10000;
|
||||
curl_multi_setopt(m, CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE, maxchunk);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE (3),
|
||||
.BR CURLMOPT_MAX_PIPELINE_LENGTH (3),
|
||||
.BR CURLMOPT_PIPELINING (3)
|
62
deps/curl/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
vendored
Normal file
62
deps/curl/docs/libcurl/opts/CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE.3
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE \- size threshold for pipelining penalty
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE,
|
||||
long size);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
No function since pipelining was removed in 7.62.0.
|
||||
|
||||
Pass a long with a \fBsize\fP in bytes. If a transfer in a pipeline is
|
||||
currently processing a request with a Content-Length larger than this
|
||||
\fICURLMOPT_CONTENT_LENGTH_PENALTY_SIZE(3)\fP, that pipeline is not considered
|
||||
for additional requests, even if it is shorter than
|
||||
\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that the size penalization is inactive.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
long maxlength = 10000;
|
||||
curl_multi_setopt(m, CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE, maxlength);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE (3)
|
72
deps/curl/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLMOPT_MAXCONNECTS.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAXCONNECTS 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_MAXCONNECTS \- size of connection cache
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAXCONNECTS, long max);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long indicating the \fBmax\fP. The set number is used as the maximum
|
||||
amount of simultaneously open connections that libcurl may keep in its
|
||||
connection cache after completed use. By default libcurl enlarges the size for
|
||||
each added easy handle to make it fit 4 times the number of added easy
|
||||
handles.
|
||||
|
||||
By setting this option, you can prevent the cache size from growing beyond the
|
||||
limit set by you.
|
||||
|
||||
When the cache is full, curl closes the oldest one in the cache to prevent the
|
||||
number of open connections from increasing.
|
||||
|
||||
This option is for the multi handle's use only, when using the easy interface
|
||||
you should instead use the \fICURLOPT_MAXCONNECTS(3)\fP option.
|
||||
|
||||
See \fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP for limiting the number of active
|
||||
connections.
|
||||
|
||||
.SH DEFAULT
|
||||
See DESCRIPTION
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* only keep 10 connections in the cache */
|
||||
curl_multi_setopt(m, CURLMOPT_MAXCONNECTS, 10L);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.3
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS (3),
|
||||
.BR CURLOPT_MAXCONNECTS (3)
|
61
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3
vendored
Normal file
61
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_CONCURRENT_STREAMS.3
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_CONCURRENT_STREAMS 3 "06 Nov 2019" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_CONCURRENT_STREAMS \- max concurrent streams for http2
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_CONCURRENT_STREAMS,
|
||||
long max);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long indicating the \fBmax\fP. The set number is used as the maximum
|
||||
number of concurrent streams libcurl should support on connections done using
|
||||
HTTP/2 or HTTP/3.
|
||||
|
||||
Valid values range from 1 to 2147483647 (2^31 - 1) and defaults to 100. The
|
||||
value passed here would be honored based on other system resources properties.
|
||||
.SH DEFAULT
|
||||
100
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* max concurrent streams 200 */
|
||||
curl_multi_setopt(m, CURLMOPT_MAX_CONCURRENT_STREAMS, 200L);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.67.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAXCONNECTS (3),
|
||||
.BR CURLOPT_MAXCONNECTS (3)
|
74
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_HOST_CONNECTIONS.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_HOST_CONNECTIONS 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_HOST_CONNECTIONS \- max number of connections to a single host
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_HOST_CONNECTIONS,
|
||||
long max);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long to indicate \fBmax\fP. The set number is used as the maximum
|
||||
amount of simultaneously open connections to a single host (a host being the
|
||||
same as a host name + port number pair). For each new session to a host,
|
||||
libcurl might open a new connection up to the limit set by
|
||||
\fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP. When the limit is reached, new
|
||||
sessions are kept pending until a connection becomes available.
|
||||
|
||||
The default \fBmax\fP value is 0, unlimited. This set limit is also used for
|
||||
proxy connections, and then the proxy is considered to be the host for which
|
||||
this limit counts.
|
||||
|
||||
When more transfers are added to the multi handle than what can be performed
|
||||
due to the set limit, they are queued up waiting for their chance. When that
|
||||
happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout is inclusive of the waiting
|
||||
time, meaning that if you set a too narrow timeout in such a case the transfer
|
||||
might never even start before it times out.
|
||||
|
||||
Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
|
||||
timeout is however treated as a per-connect timeout.
|
||||
.SH DEFAULT
|
||||
0
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* do no more than 2 connections per host */
|
||||
curl_multi_setopt(m, CURLMOPT_MAX_HOST_CONNECTIONS, 2L);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAXCONNECTS (3),
|
||||
.BR CURLMOPT_MAX_TOTAL_CONNECTIONS (3)
|
66
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
vendored
Normal file
66
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_PIPELINE_LENGTH.3
vendored
Normal file
@ -0,0 +1,66 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_PIPELINE_LENGTH 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_PIPELINE_LENGTH \- maximum number of requests in a pipeline
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_PIPELINE_LENGTH,
|
||||
long max);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
No function since pipelining was removed in 7.62.0.
|
||||
|
||||
Pass a long. The set \fBmax\fP number is used as the maximum amount of
|
||||
outstanding requests in an HTTP/1.1 pipeline. This option is only used for
|
||||
HTTP/1.1 pipelining, not for HTTP/2 multiplexing.
|
||||
|
||||
When this limit is reached, libcurl creates another connection to the same
|
||||
host (see \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP), or queue the request until
|
||||
one of the pipelines to the host is ready to accept a request. Thus, the
|
||||
total number of requests in-flight is \fICURLMOPT_MAX_HOST_CONNECTIONS(3)\fP *
|
||||
\fICURLMOPT_MAX_PIPELINE_LENGTH(3)\fP.
|
||||
.SH DEFAULT
|
||||
5
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* set a more conservative pipe length */
|
||||
curl_multi_setopt(m, CURLMOPT_MAX_PIPELINE_LENGTH, 3L);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS (3)
|
72
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
vendored
Normal file
72
deps/curl/docs/libcurl/opts/CURLMOPT_MAX_TOTAL_CONNECTIONS.3
vendored
Normal file
@ -0,0 +1,72 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_MAX_TOTAL_CONNECTIONS 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_MAX_TOTAL_CONNECTIONS \- max simultaneously open connections
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_MAX_TOTAL_CONNECTIONS,
|
||||
long amount);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long for the \fBamount\fP. The set number is used as the maximum number
|
||||
of simultaneously open connections in total using this multi handle. For each
|
||||
new session, libcurl might open a new connection up to the limit set by
|
||||
\fICURLMOPT_MAX_TOTAL_CONNECTIONS(3)\fP. When the limit is reached, new
|
||||
sessions are held pending until there are available connections. If
|
||||
\fICURLMOPT_PIPELINING(3)\fP is enabled, libcurl can try multiplexing if the
|
||||
host is capable of it.
|
||||
|
||||
When more transfers are added to the multi handle than what can be performed
|
||||
due to the set limit, they get queued up waiting for their chance. When that
|
||||
happens, the \fICURLOPT_TIMEOUT_MS(3)\fP timeout is counted inclusive of the
|
||||
waiting time, meaning that if you set a too narrow timeout in such a case the
|
||||
transfer might never even start before it times out.
|
||||
|
||||
Even in the queued up situation, the \fICURLOPT_CONNECTTIMEOUT_MS(3)\fP
|
||||
timeout is however treated as a per-connect timeout.
|
||||
.SH DEFAULT
|
||||
The default value is 0, which means that there is no limit. It is then simply
|
||||
controlled by the number of easy handles added.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* never do more than 15 connections */
|
||||
curl_multi_setopt(m, CURLMOPT_MAX_TOTAL_CONNECTIONS, 15L);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_MAXCONNECTS (3),
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS (3)
|
74
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING.3
vendored
Normal file
74
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING.3
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PIPELINING 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_PIPELINING \- enable HTTP pipelining and multiplexing
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING, long bitmask);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass in the correct value in the \fBbitmask\fP parameter to instruct libcurl
|
||||
to enable multiplexing for this multi handle.
|
||||
|
||||
With multiplexing enabled, libcurl attempts to do multiple transfers over the
|
||||
same connection when doing parallel transfers to the same hosts.
|
||||
|
||||
.IP CURLPIPE_NOTHING (0)
|
||||
Default, which means doing no attempts at multiplexing.
|
||||
.IP CURLPIPE_HTTP1 (1)
|
||||
This bit is deprecated and has no effect since version 7.62.0.
|
||||
.IP CURLPIPE_MULTIPLEX (2)
|
||||
If this bit is set, libcurl tries to multiplex the new transfer over an
|
||||
existing connection if possible. This requires HTTP/2 or HTTP/3.
|
||||
.SH DEFAULT
|
||||
Since 7.62.0, \fBCURLPIPE_MULTIPLEX\fP is enabled by default.
|
||||
|
||||
Before that, default was \fBCURLPIPE_NOTHING\fP.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
/* try HTTP/2 multiplexing */
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINING, CURLPIPE_MULTIPLEX);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.0. Multiplex support bit added in 7.43.0. HTTP/1 Pipelining
|
||||
support was disabled in 7.62.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_CHUNK_LENGTH_PENALTY_SIZE (3),
|
||||
.BR CURLMOPT_CONTENT_LENGTH_PENALTY_SIZE (3),
|
||||
.BR CURLMOPT_MAX_HOST_CONNECTIONS (3),
|
||||
.BR CURLMOPT_MAX_PIPELINE_LENGTH (3),
|
||||
.BR CURLMOPT_MAXCONNECTS (3),
|
||||
.BR CURLMOPT_PIPELINING_SITE_BL (3)
|
71
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
vendored
Normal file
71
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SERVER_BL.3
vendored
Normal file
@ -0,0 +1,71 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PIPELINING_SERVER_BL 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_PIPELINING_SERVER_BL \- pipelining server block list
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SERVER_BL,
|
||||
char **servers);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
No function since pipelining was removed in 7.62.0.
|
||||
|
||||
Pass a \fBservers\fP array of char *, ending with a NULL entry. This is a list
|
||||
of server types prefixes (in the Server: HTTP header) that are blocked from
|
||||
pipelining, i.e server types that are known to not support HTTP
|
||||
pipelining. The array is copied by libcurl.
|
||||
|
||||
Note that the comparison matches if the Server: header begins with the string
|
||||
in the block list, i.e "Server: Ninja 1.2.3" and "Server: Ninja 1.4.0" can
|
||||
both be blocked by having "Ninja" in the list.
|
||||
|
||||
Pass a NULL pointer to clear the block list.
|
||||
.SH DEFAULT
|
||||
The default value is NULL, which means that there is no block list.
|
||||
.SH PROTOCOLS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
static char *server_block_list[] =
|
||||
{
|
||||
"Microsoft-IIS/6.0",
|
||||
"nginx/0.8.54",
|
||||
NULL
|
||||
};
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINING_SERVER_BL, server_block_list);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLMOPT_PIPELINING_SITE_BL (3)
|
68
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
vendored
Normal file
68
deps/curl/docs/libcurl/opts/CURLMOPT_PIPELINING_SITE_BL.3
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PIPELINING_SITE_BL 3 "4 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_PIPELINING_SITE_BL \- pipelining host block list
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PIPELINING_SITE_BL,
|
||||
char **hosts);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
No function since pipelining was removed in 7.62.0.
|
||||
|
||||
Pass a \fBhosts\fP array of char *, ending with a NULL entry. This is a list
|
||||
of sites that are blocked from pipelining, i.e sites that are known to not
|
||||
support HTTP pipelining. The array is copied by libcurl.
|
||||
|
||||
Pass a NULL pointer to clear the block list.
|
||||
.SH DEFAULT
|
||||
The default value is NULL, which means that there is no block list.
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
static char *site_block_list[] =
|
||||
{
|
||||
"www.haxx.se",
|
||||
"www.example.com:1234",
|
||||
NULL
|
||||
};
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURLM *m = curl_multi_init();
|
||||
curl_multi_setopt(m, CURLMOPT_PIPELINING_SITE_BL, site_block_list);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.30.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLMOPT_PIPELINING_SERVER_BL (3)
|
89
deps/curl/docs/libcurl/opts/CURLMOPT_PUSHDATA.3
vendored
Normal file
89
deps/curl/docs/libcurl/opts/CURLMOPT_PUSHDATA.3
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PUSHDATA 3 "1 Jun 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_PUSHDATA \- pointer to pass to push callback
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PUSHDATA, void *pointer);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Set a \fIpointer\fP to pass as the last argument to the
|
||||
\fICURLMOPT_PUSHFUNCTION(3)\fP callback. The pointer is not touched or used by
|
||||
libcurl itself, only passed on to the callback function.
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
HTTP(S)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
#include <string.h>
|
||||
|
||||
/* only allow pushes for file names starting with "push-" */
|
||||
int push_callback(CURL *parent,
|
||||
CURL *easy,
|
||||
size_t num_headers,
|
||||
struct curl_pushheaders *headers,
|
||||
void *clientp)
|
||||
{
|
||||
char *headp;
|
||||
int *transfers = (int *)clientp;
|
||||
FILE *out;
|
||||
headp = curl_pushheader_byname(headers, ":path");
|
||||
if(headp && !strncmp(headp, "/push-", 6)) {
|
||||
fprintf(stderr, "The PATH is %s\\n", headp);
|
||||
|
||||
/* save the push here */
|
||||
out = fopen("pushed-stream", "wb");
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
|
||||
|
||||
(*transfers)++; /* one more */
|
||||
|
||||
return CURL_PUSH_OK;
|
||||
}
|
||||
return CURL_PUSH_DENY;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter;
|
||||
CURLM *multi = curl_multi_init();
|
||||
curl_multi_setopt(multi, CURLMOPT_PUSHFUNCTION, push_callback);
|
||||
curl_multi_setopt(multi, CURLMOPT_PUSHDATA, &counter);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.44.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLMOPT_PUSHFUNCTION (3),
|
||||
.BR CURLOPT_PIPEWAIT (3),
|
||||
.BR RFC 7540
|
139
deps/curl/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3
vendored
Normal file
139
deps/curl/docs/libcurl/opts/CURLMOPT_PUSHFUNCTION.3
vendored
Normal file
@ -0,0 +1,139 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_PUSHFUNCTION 3 "1 Jun 2015" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_PUSHFUNCTION \- callback that approves or denies server pushes
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
int curl_push_callback(CURL *parent,
|
||||
CURL *easy,
|
||||
size_t num_headers,
|
||||
struct curl_pushheaders *headers,
|
||||
void *clientp);
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_PUSHFUNCTION,
|
||||
curl_push_callback func);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
This callback gets called when a new HTTP/2 stream is being pushed by the
|
||||
server (using the PUSH_PROMISE frame). If no push callback is set, all offered
|
||||
pushes are denied automatically.
|
||||
.SH CALLBACK DESCRIPTION
|
||||
The callback gets its arguments like this:
|
||||
|
||||
\fIparent\fP is the handle of the stream on which this push arrives. The new
|
||||
handle has been duplicated from the parent, meaning that it has gotten all its
|
||||
options inherited. It is then up to the application to alter any options if
|
||||
desired.
|
||||
|
||||
\fIeasy\fP is a newly created handle that represents this upcoming transfer.
|
||||
|
||||
\fInum_headers\fP is the number of name+value pairs that was received and can
|
||||
be accessed
|
||||
|
||||
\fIheaders\fP is a handle used to access push headers using the accessor
|
||||
functions described below. This only accesses and provides the PUSH_PROMISE
|
||||
headers, the normal response headers are provided in the header callback as
|
||||
usual.
|
||||
|
||||
\fIclientp\fP is the pointer set with \fICURLMOPT_PUSHDATA(3)\fP
|
||||
|
||||
If the callback returns CURL_PUSH_OK, the new easy handle is added to the
|
||||
multi handle, the callback must not do that by itself.
|
||||
|
||||
The callback can access PUSH_PROMISE headers with two accessor
|
||||
functions. These functions can only be used from within this callback and they
|
||||
can only access the PUSH_PROMISE headers: \fIcurl_pushheader_byname(3)\fP and
|
||||
\fIcurl_pushheader_bynum(3)\fP. The normal response headers are passed to the
|
||||
header callback for pushed streams just as for normal streams.
|
||||
|
||||
The header fields can also be accessed with \fIcurl_easy_header(3)\fP,
|
||||
introduced in later libcurl versions.
|
||||
.SH CALLBACK RETURN VALUE
|
||||
.IP "CURL_PUSH_OK (0)"
|
||||
The application has accepted the stream and it can now start receiving data,
|
||||
the ownership of the CURL handle has been taken over by the application.
|
||||
.IP "CURL_PUSH_DENY (1)"
|
||||
The callback denies the stream and no data reaches the application, the easy
|
||||
handle is destroyed by libcurl.
|
||||
.IP "CURL_PUSH_ERROROUT (2)"
|
||||
Returning this code rejects the pushed stream and returns an error back on the
|
||||
parent stream making it get closed with an error. (Added in 7.72.0)
|
||||
.IP *
|
||||
All other return codes are reserved for future use.
|
||||
.SH DEFAULT
|
||||
NULL, no callback
|
||||
.SH PROTOCOLS
|
||||
HTTP(S) (HTTP/2 only)
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
#include <string.h>
|
||||
|
||||
/* only allow pushes for file names starting with "push-" */
|
||||
int push_callback(CURL *parent,
|
||||
CURL *easy,
|
||||
size_t num_headers,
|
||||
struct curl_pushheaders *headers,
|
||||
void *clientp)
|
||||
{
|
||||
char *headp;
|
||||
int *transfers = (int *)clientp;
|
||||
FILE *out;
|
||||
headp = curl_pushheader_byname(headers, ":path");
|
||||
if(headp && !strncmp(headp, "/push-", 6)) {
|
||||
fprintf(stderr, "The PATH is %s\\n", headp);
|
||||
|
||||
/* save the push here */
|
||||
out = fopen("pushed-stream", "wb");
|
||||
|
||||
/* write to this file */
|
||||
curl_easy_setopt(easy, CURLOPT_WRITEDATA, out);
|
||||
|
||||
(*transfers)++; /* one more */
|
||||
|
||||
return CURL_PUSH_OK;
|
||||
}
|
||||
return CURL_PUSH_DENY;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
int counter;
|
||||
CURLM *multi = curl_multi_init();
|
||||
curl_multi_setopt(multi, CURLMOPT_PUSHFUNCTION, push_callback);
|
||||
curl_multi_setopt(multi, CURLMOPT_PUSHDATA, &counter);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.44.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_PUSHDATA (3),
|
||||
.BR CURLMOPT_PIPELINING (3),
|
||||
.BR CURLOPT_PIPEWAIT (3),
|
||||
.BR RFC 7540
|
83
deps/curl/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
vendored
Normal file
83
deps/curl/docs/libcurl/opts/CURLMOPT_SOCKETDATA.3
vendored
Normal file
@ -0,0 +1,83 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_SOCKETDATA 3 "3 Nov 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_SOCKETDATA \- custom pointer passed to the socket callback
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETDATA, void *pointer);
|
||||
.SH DESCRIPTION
|
||||
A data \fIpointer\fP to pass to the socket callback set with the
|
||||
\fICURLMOPT_SOCKETFUNCTION(3)\fP option.
|
||||
|
||||
This pointer is not touched by libcurl but is only passed in as the socket
|
||||
callbacks's \fBclientp\fP argument.
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
struct priv {
|
||||
void *ours;
|
||||
};
|
||||
|
||||
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
{
|
||||
struct priv *p = sockp;
|
||||
printf("my ptr: %p\\n", p->ours);
|
||||
|
||||
if(what == CURL_POLL_REMOVE) {
|
||||
/* remove the socket from our collection */
|
||||
}
|
||||
if(what & CURL_POLL_IN) {
|
||||
/* wait for read on this socket */
|
||||
}
|
||||
if(what & CURL_POLL_OUT) {
|
||||
/* wait for write on this socket */
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct priv setup;
|
||||
CURLM *multi = curl_multi_init();
|
||||
/* ... use socket callback and custom pointer */
|
||||
curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
|
||||
curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, &setup);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_socket_action (3),
|
||||
.BR CURLMOPT_SOCKETFUNCTION (3),
|
||||
.BR CURLMOPT_TIMERFUNCTION (3)
|
126
deps/curl/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
vendored
Normal file
126
deps/curl/docs/libcurl/opts/CURLMOPT_SOCKETFUNCTION.3
vendored
Normal file
@ -0,0 +1,126 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_SOCKETFUNCTION 3 "3 Nov 2016" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_SOCKETFUNCTION \- callback informed about what to wait for
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
int socket_callback(CURL *easy, /* easy handle */
|
||||
curl_socket_t s, /* socket */
|
||||
int what, /* describes the socket */
|
||||
void *clientp, /* private callback pointer */
|
||||
void *socketp); /* private socket pointer */
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_SOCKETFUNCTION, socket_callback);
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to your callback function, which should match the prototype
|
||||
shown above.
|
||||
|
||||
When the \fIcurl_multi_socket_action(3)\fP function is called, it uses this
|
||||
callback to inform the application about updates in the socket (file
|
||||
descriptor) status by doing none, one, or multiple calls to the
|
||||
\fBsocket_callback\fP. The callback function gets status updates with changes
|
||||
since the previous time the callback was called. If the given callback pointer
|
||||
is set to NULL, no callback is called.
|
||||
|
||||
libcurl then expects the application to monitor the sockets for the specific
|
||||
activities and tell libcurl again when something happens on one of them. Tell
|
||||
libcurl by calling \fIcurl_multi_socket_action(3)\fP.
|
||||
.SH "CALLBACK ARGUMENTS"
|
||||
\fIeasy\fP identifies the specific transfer for which this update is related.
|
||||
|
||||
\fIs\fP is the specific socket this function invocation concerns. If the
|
||||
\fBwhat\fP argument is not CURL_POLL_REMOVE then it holds information about
|
||||
what activity on this socket the application is supposed to
|
||||
monitor. Subsequent calls to this callback might update the \fBwhat\fP bits
|
||||
for a socket that is already monitored.
|
||||
|
||||
The socket callback should return 0 on success, and -1 on error. If this
|
||||
callback returns error, \fBall\fP transfers currently in progress in this
|
||||
multi handle are aborted and made to fail.
|
||||
|
||||
\fBclientp\fP is set with \fICURLMOPT_SOCKETDATA(3)\fP.
|
||||
|
||||
\fBsocketp\fP is set with \fIcurl_multi_assign(3)\fP or NULL.
|
||||
|
||||
The \fBwhat\fP parameter informs the callback on the status of the given
|
||||
socket. It can hold one of these values:
|
||||
.IP CURL_POLL_IN
|
||||
Wait for incoming data. For the socket to become readable.
|
||||
.IP CURL_POLL_OUT
|
||||
Wait for outgoing data. For the socket to become writable.
|
||||
.IP CURL_POLL_INOUT
|
||||
Wait for incoming and outgoing data. For the socket to become readable or
|
||||
writable.
|
||||
.IP CURL_POLL_REMOVE
|
||||
The specified socket/file descriptor is no longer used by libcurl for any
|
||||
active transfer. It might soon be added again.
|
||||
.SH DEFAULT
|
||||
NULL (no callback)
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
struct priv {
|
||||
void *ours;
|
||||
};
|
||||
|
||||
static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
|
||||
{
|
||||
struct priv *p = sockp;
|
||||
printf("our ptr: %p\\n", p->ours);
|
||||
|
||||
if(what == CURL_POLL_REMOVE) {
|
||||
/* remove the socket from our collection */
|
||||
}
|
||||
if(what & CURL_POLL_IN) {
|
||||
/* wait for read on this socket */
|
||||
}
|
||||
if(what & CURL_POLL_OUT) {
|
||||
/* wait for write on this socket */
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct priv setup;
|
||||
CURLM *multi = curl_multi_init();
|
||||
/* ... use socket callback and custom pointer */
|
||||
curl_multi_setopt(multi, CURLMOPT_SOCKETFUNCTION, sock_cb);
|
||||
curl_multi_setopt(multi, CURLMOPT_SOCKETDATA, &setup);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.15.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK.
|
||||
.SH "SEE ALSO"
|
||||
.BR curl_multi_socket_action (3),
|
||||
.BR CURLMOPT_SOCKETDATA (3),
|
||||
.BR CURLMOPT_TIMERFUNCTION (3)
|
76
deps/curl/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
vendored
Normal file
76
deps/curl/docs/libcurl/opts/CURLMOPT_TIMERDATA.3
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_TIMERDATA 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_TIMERDATA \- custom pointer to pass to timer callback
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERDATA, void *pointer);
|
||||
.SH DESCRIPTION
|
||||
A data \fBpointer\fP to pass to the timer callback set with the
|
||||
\fICURLMOPT_TIMERFUNCTION(3)\fP option.
|
||||
|
||||
This pointer is not touched by libcurl but is only be passed in to the timer
|
||||
callbacks's \fBclientp\fP argument.
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
struct priv {
|
||||
void *custom;
|
||||
};
|
||||
|
||||
static int timerfunc(CURLM *multi, long timeout_ms, void *clientp)
|
||||
{
|
||||
struct priv *mydata = clientp;
|
||||
printf("our ptr: %p\\n", mydata->custom);
|
||||
|
||||
if(timeout_ms) {
|
||||
/* this is the new single timeout to wait for */
|
||||
}
|
||||
else {
|
||||
/* delete the timeout, nothing to wait for now */
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct priv mydata;
|
||||
CURLM *multi = curl_multi_init();
|
||||
curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc);
|
||||
curl_multi_setopt(multi, CURLMOPT_TIMERDATA, &mydata);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_TIMERFUNCTION (3),
|
||||
.BR CURLMOPT_SOCKETFUNCTION (3)
|
104
deps/curl/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
vendored
Normal file
104
deps/curl/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.3
vendored
Normal file
@ -0,0 +1,104 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLMOPT_TIMERFUNCTION 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLMOPT_TIMERFUNCTION \- callback to receive timeout values
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
int timer_callback(CURLM *multi, /* multi handle */
|
||||
long timeout_ms, /* timeout in number of ms */
|
||||
void *clientp); /* private callback pointer */
|
||||
|
||||
CURLMcode curl_multi_setopt(CURLM *handle, CURLMOPT_TIMERFUNCTION, timer_callback);
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to your callback function, which should match the prototype
|
||||
shown above.
|
||||
|
||||
Certain features, such as timeouts and retries, require you to call libcurl
|
||||
even when there is no activity on the file descriptors.
|
||||
|
||||
Your callback function \fBtimer_callback\fP should install a non-repeating
|
||||
timer with an expire time of \fBtimeout_ms\fP milliseconds. When that timer
|
||||
fires, call either \fIcurl_multi_socket_action(3)\fP or
|
||||
\fIcurl_multi_perform(3)\fP, depending on which interface you use.
|
||||
|
||||
A \fBtimeout_ms\fP value of -1 passed to this callback means you should delete
|
||||
the timer. All other values are valid expire times in number of milliseconds.
|
||||
|
||||
The \fBtimer_callback\fP is called when the timeout expire time is changed.
|
||||
|
||||
The \fBclientp\fP pointer is set with \fICURLMOPT_TIMERDATA(3)\fP.
|
||||
|
||||
The timer callback should return 0 on success, and -1 on error. If this
|
||||
callback returns error, \fBall\fP transfers currently in progress in this
|
||||
multi handle are aborted and made to fail.
|
||||
|
||||
This callback can be used instead of, or in addition to,
|
||||
\fIcurl_multi_timeout(3)\fP.
|
||||
|
||||
\fBWARNING:\fP do not call libcurl directly from within the callback itself
|
||||
when the \fBtimeout_ms\fP value is zero, since it risks triggering an
|
||||
unpleasant recursive behavior that immediately calls another call to the
|
||||
callback with a zero timeout...
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
struct priv {
|
||||
void *custom;
|
||||
};
|
||||
|
||||
static int timerfunc(CURLM *multi, long timeout_ms, void *clientp)
|
||||
{
|
||||
struct priv *mydata = clientp;
|
||||
printf("our ptr: %p\\n", mydata->custom);
|
||||
|
||||
if(timeout_ms) {
|
||||
/* this is the new single timeout to wait for */
|
||||
}
|
||||
else {
|
||||
/* delete the timeout, nothing to wait for now */
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
struct priv mydata;
|
||||
CURLM *multi = curl_multi_init();
|
||||
curl_multi_setopt(multi, CURLMOPT_TIMERFUNCTION, timerfunc);
|
||||
curl_multi_setopt(multi, CURLMOPT_TIMERDATA, &mydata);
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.16.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLM_OK if the option is supported, and CURLM_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLMOPT_TIMERDATA (3),
|
||||
.BR CURLMOPT_SOCKETFUNCTION (3)
|
73
deps/curl/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3
vendored
Normal file
73
deps/curl/docs/libcurl/opts/CURLOPT_ABSTRACT_UNIX_SOCKET.3
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ABSTRACT_UNIX_SOCKET 3 "08 Jan 2017" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ABSTRACT_UNIX_SOCKET \- abstract Unix domain socket
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ABSTRACT_UNIX_SOCKET,
|
||||
char *path);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Enables the use of an abstract Unix domain socket instead of establishing a
|
||||
TCP connection to a host. The parameter should be a char * to a
|
||||
null-terminated string holding the path of the socket. The path is set to
|
||||
\fIpath\fP prefixed by a NULL byte. This is the convention for abstract
|
||||
sockets, however it should be stressed that the path passed to this function
|
||||
should not contain a leading NULL byte.
|
||||
|
||||
On non-supporting platforms, the abstract address is interpreted as an empty
|
||||
string and fails gracefully, generating a runtime error.
|
||||
|
||||
This option shares the same semantics as \fICURLOPT_UNIX_SOCKET_PATH(3)\fP in
|
||||
which documentation more details can be found. Internally, these two options
|
||||
share the same storage and therefore only one of them can be set per handle.
|
||||
.SH DEFAULT
|
||||
Default is NULL.
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_ABSTRACT_UNIX_SOCKET, "/tmp/foo.sock");
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "http://localhost/");
|
||||
|
||||
/* Perform the request */
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.53.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_UNIX_SOCKET_PATH (3),
|
||||
.BR unix (7)
|
63
deps/curl/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
vendored
Normal file
63
deps/curl/docs/libcurl/opts/CURLOPT_ACCEPTTIMEOUT_MS.3
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ACCEPTTIMEOUT_MS 3 "19 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ACCEPTTIMEOUT_MS \- timeout waiting for FTP server to connect back
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPTTIMEOUT_MS, long ms);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long telling libcurl the maximum number of milliseconds to wait for a
|
||||
server to connect back to libcurl when an active FTP connection is used.
|
||||
.SH DEFAULT
|
||||
60000 milliseconds
|
||||
.SH PROTOCOLS
|
||||
FTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/path/file");
|
||||
|
||||
/* wait no more than 5 seconds for FTP server responses */
|
||||
curl_easy_setopt(curl, CURLOPT_ACCEPTTIMEOUT_MS, 5000L);
|
||||
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.24.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_CONNECTTIMEOUT_MS (3),
|
||||
.BR CURLOPT_DEBUGFUNCTION (3),
|
||||
.BR CURLOPT_STDERR (3)
|
112
deps/curl/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
vendored
Normal file
112
deps/curl/docs/libcurl/opts/CURLOPT_ACCEPT_ENCODING.3
vendored
Normal file
@ -0,0 +1,112 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ACCEPT_ENCODING 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ACCEPT_ENCODING \- automatic decompression of HTTP downloads
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ACCEPT_ENCODING, char *enc);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a char * argument specifying what encoding you would like.
|
||||
|
||||
Sets the contents of the Accept-Encoding: header sent in an HTTP request, and
|
||||
enables decoding of a response when a Content-Encoding: header is received.
|
||||
|
||||
libcurl potentially supports several different compressed encodings depending
|
||||
on what support that has been built-in.
|
||||
|
||||
To aid applications not having to bother about what specific algorithms this
|
||||
particular libcurl build supports, libcurl allows a zero-length string to be
|
||||
set ("") to ask for an Accept-Encoding: header to be used that contains all
|
||||
built-in supported encodings.
|
||||
|
||||
Alternatively, you can specify exactly the encoding or list of encodings you
|
||||
want in the response. The following encodings are supported: \fIidentity\fP,
|
||||
meaning non-compressed, \fIdeflate\fP which requests the server to compress
|
||||
its response using the zlib algorithm, \fIgzip\fP which requests the gzip
|
||||
algorithm, (since curl 7.57.0) \fIbr\fP which is brotli and (since curl
|
||||
7.72.0) \fIzstd\fP which is zstd. Provide them in the string as a
|
||||
comma-separated list of accepted encodings, like: \fB"br, gzip, deflate"\fP.
|
||||
|
||||
Set \fICURLOPT_ACCEPT_ENCODING(3)\fP to NULL to explicitly disable it, which
|
||||
makes libcurl not send an Accept-Encoding: header and not decompress received
|
||||
contents automatically.
|
||||
|
||||
You can also opt to just include the Accept-Encoding: header in your request
|
||||
with \fICURLOPT_HTTPHEADER(3)\fP but then there is no automatic decompressing
|
||||
when receiving data.
|
||||
|
||||
This is a request, not an order; the server may or may not do it. This option
|
||||
must be set (to any non-NULL value) or else any unsolicited encoding done by
|
||||
the server is ignored.
|
||||
|
||||
Servers might respond with Content-Encoding even without getting a
|
||||
Accept-Encoding: in the request. Servers might respond with a different
|
||||
Content-Encoding than what was asked for in the request.
|
||||
|
||||
The Content-Length: servers send for a compressed response is supposed to
|
||||
indicate the length of the compressed content so when auto decoding is enabled
|
||||
it may not match the sum of bytes reported by the write callbacks (although,
|
||||
sending the length of the non-compressed content is a common server mistake).
|
||||
|
||||
The application does not have to keep the string around after setting this
|
||||
option.
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com");
|
||||
|
||||
/* enable all supported built-in compressions */
|
||||
curl_easy_setopt(curl, CURLOPT_ACCEPT_ENCODING, "");
|
||||
|
||||
/* Perform the request */
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
This option was called CURLOPT_ENCODING before 7.21.6
|
||||
|
||||
The specific libcurl you are using must have been built with zlib to be able to
|
||||
decompress gzip and deflate responses, with the brotli library to
|
||||
decompress brotli responses and with the zstd library to decompress zstd
|
||||
responses.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
|
||||
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_HTTP_CONTENT_DECODING (3),
|
||||
.BR CURLOPT_HTTPHEADER (3),
|
||||
.BR CURLOPT_TRANSFER_ENCODING (3)
|
65
deps/curl/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
vendored
Normal file
65
deps/curl/docs/libcurl/opts/CURLOPT_ADDRESS_SCOPE.3
vendored
Normal file
@ -0,0 +1,65 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ADDRESS_SCOPE 3 "19 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ADDRESS_SCOPE \- scope id for IPv6 addresses
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ADDRESS_SCOPE, long scope);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long specifying the scope id value to use when connecting to IPv6 addresses.
|
||||
.SH DEFAULT
|
||||
0
|
||||
.SH PROTOCOLS
|
||||
All, when using IPv6
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
#include <net/if.h> /* for if_nametoindex() */
|
||||
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode ret;
|
||||
long my_scope_id;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
my_scope_id = if_nametoindex("eth0");
|
||||
curl_easy_setopt(curl, CURLOPT_ADDRESS_SCOPE, my_scope_id);
|
||||
ret = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.19.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
Returns CURLE_BAD_FUNCTION_ARGUMENT if set to a negative value.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_DEBUGFUNCTION (3),
|
||||
.BR CURLOPT_STDERR (3)
|
94
deps/curl/docs/libcurl/opts/CURLOPT_ALTSVC.3
vendored
Normal file
94
deps/curl/docs/libcurl/opts/CURLOPT_ALTSVC.3
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ALTSVC 3 "5 Feb 2019" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ALTSVC \- alt-svc cache file name
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC, char *filename);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass in a pointer to a \fIfilename\fP to instruct libcurl to use that file as
|
||||
the Alt-Svc cache to read existing cache contents from and possibly also write
|
||||
it back to after a transfer, unless \fBCURLALTSVC_READONLYFILE\fP is set in
|
||||
\fICURLOPT_ALTSVC_CTRL(3)\fP.
|
||||
|
||||
Specify a blank file name ("") to make libcurl not load from a file at all.
|
||||
.SH DEFAULT
|
||||
NULL. The alt-svc cache is not read nor written to file.
|
||||
.SH PROTOCOLS
|
||||
HTTPS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, CURLALTSVC_H1);
|
||||
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH "FILE FORMAT"
|
||||
A text based file with one line per alt-svc entry and each line consists of
|
||||
nine space-separated fields.
|
||||
|
||||
An example line could look like
|
||||
|
||||
h2 www.example 8443 h3 second.example 443 "20190808 06:18:37" 1 0
|
||||
|
||||
The fields of that line are:
|
||||
|
||||
.IP h2
|
||||
ALPN id for the source origin
|
||||
.IP www.example
|
||||
Host name for the source origin
|
||||
.IP 8443
|
||||
Port number for the source origin
|
||||
.IP h3
|
||||
ALPN id for the destination host
|
||||
.IP second.example
|
||||
Host name for the destination host
|
||||
.IP 443
|
||||
Port number for the destination host
|
||||
.IP 2019*
|
||||
Expiration date and time of this entry within double quotes. The date format
|
||||
is "YYYYMMDD HH:MM:SS" and the time zone is GMT.
|
||||
.IP 1
|
||||
Boolean (1 or 0) if "persist" was set for this entry
|
||||
.IP 0
|
||||
Integer priority value (not currently used)
|
||||
.SH AVAILABILITY
|
||||
Added in 7.64.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_ALTSVC_CTRL (3),
|
||||
.BR CURLOPT_CONNECT_TO (3),
|
||||
.BR CURLOPT_COOKIEFILE (3),
|
||||
.BR CURLOPT_RESOLVE (3)
|
91
deps/curl/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3
vendored
Normal file
91
deps/curl/docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.3
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_ALTSVC_CTRL 3 "5 Feb 2019" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_ALTSVC_CTRL \- control alt-svc behavior
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
#define CURLALTSVC_READONLYFILE (1<<2)
|
||||
#define CURLALTSVC_H1 (1<<3)
|
||||
#define CURLALTSVC_H2 (1<<4)
|
||||
#define CURLALTSVC_H3 (1<<5)
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Populate the long \fIbitmask\fP with the correct set of features to instruct
|
||||
libcurl how to handle Alt-Svc for the transfers using this handle.
|
||||
|
||||
libcurl only accepts Alt-Svc headers over a secure transport, meaning
|
||||
HTTPS. It also only completes a request to an alternative origin if that
|
||||
origin is properly hosted over HTTPS. These requirements are there to make
|
||||
sure both the source and the destination are legitimate.
|
||||
|
||||
Alternative services are only used when setting up new connections. If there
|
||||
exists an existing connection to the host in the connection pool, then that is
|
||||
preferred.
|
||||
|
||||
Setting any bit enables the alt-svc engine.
|
||||
.IP "CURLALTSVC_READONLYFILE"
|
||||
Do not write the alt-svc cache back to the file specified with
|
||||
\fICURLOPT_ALTSVC(3)\fP even if it gets updated. By default a file specified
|
||||
with that option is read and written to as deemed necessary.
|
||||
.IP "CURLALTSVC_H1"
|
||||
Accept alternative services offered over HTTP/1.1.
|
||||
.IP "CURLALTSVC_H2"
|
||||
Accept alternative services offered over HTTP/2. This is only used if libcurl
|
||||
was also built to actually support HTTP/2, otherwise this bit is ignored.
|
||||
.IP "CURLALTSVC_H3"
|
||||
Accept alternative services offered over HTTP/3. This is only used if libcurl
|
||||
was also built to actually support HTTP/3, otherwise this bit is ignored.
|
||||
.SH DEFAULT
|
||||
Alt-Svc handling is disabled by default. If \fICURLOPT_ALTSVC(3)\fP is set,
|
||||
\fICURLOPT_ALTSVC_CTRL(3)\fP has a default value corresponding to
|
||||
CURLALTSVC_H1 | CURLALTSVC_H2 | CURLALTSVC_H3 - the HTTP/2 and HTTP/3 bits are
|
||||
only set if libcurl was built with support for those versions.
|
||||
.SH PROTOCOLS
|
||||
HTTPS
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_ALTSVC_CTRL, (long)CURLALTSVC_H1);
|
||||
curl_easy_setopt(curl, CURLOPT_ALTSVC, "altsvc-cache.txt");
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.64.1
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_ALTSVC (3),
|
||||
.BR CURLOPT_CONNECT_TO (3),
|
||||
.BR CURLOPT_RESOLVE (3)
|
63
deps/curl/docs/libcurl/opts/CURLOPT_APPEND.3
vendored
Normal file
63
deps/curl/docs/libcurl/opts/CURLOPT_APPEND.3
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_APPEND 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_APPEND \- append to the remote file
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_APPEND, long append);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
A long parameter set to 1 tells the library to append to the remote file
|
||||
instead of overwrite it. This is only useful when uploading to an FTP site.
|
||||
.SH DEFAULT
|
||||
0 (disabled)
|
||||
.SH PROTOCOLS
|
||||
FTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "ftp://example.com/dir/to/newfile");
|
||||
curl_easy_setopt(curl, CURLOPT_UPLOAD, 1L);
|
||||
curl_easy_setopt(curl, CURLOPT_APPEND, 1L);
|
||||
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
This option was known as CURLOPT_FTPAPPEND up to 7.16.4
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_DIRLISTONLY (3),
|
||||
.BR CURLOPT_RESUME_FROM (3),
|
||||
.BR CURLOPT_UPLOAD (3)
|
75
deps/curl/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
vendored
Normal file
75
deps/curl/docs/libcurl/opts/CURLOPT_AUTOREFERER.3
vendored
Normal file
@ -0,0 +1,75 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_AUTOREFERER 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_AUTOREFERER \- automatically update the referer header
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AUTOREFERER, long autorefer);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long parameter set to 1 to enable this. When enabled, libcurl
|
||||
automatically sets the Referer: header field in HTTP requests to the full URL
|
||||
when it follows a Location: redirect to a new destination.
|
||||
|
||||
The automatic referer is set to the full previous URL even when redirects are
|
||||
done cross-origin or following redirects to insecure protocols. This is
|
||||
considered a minor privacy leak by some.
|
||||
.SH DEFAULT
|
||||
0, disabled
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/foo.bin");
|
||||
|
||||
/* follow redirects */
|
||||
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L);
|
||||
|
||||
/* set Referer: automatically when following redirects */
|
||||
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Along with HTTP
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if HTTP is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLINFO_EFFECTIVE_URL (3),
|
||||
.BR CURLINFO_REDIRECT_URL (3),
|
||||
.BR CURLOPT_FOLLOWLOCATION (3),
|
||||
.BR CURLOPT_REFERER (3)
|
111
deps/curl/docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
vendored
Normal file
111
deps/curl/docs/libcurl/opts/CURLOPT_AWS_SIGV4.3
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.haxx.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_AWS_SIGV4 3 "03 Jun 2020" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_AWS_SIGV4 \- V4 signature
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_AWS_SIGV4, char *param);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Provides AWS V4 signature authentication on HTTP(S) header.
|
||||
.PP
|
||||
Pass a char * that is the collection of specific arguments are used for
|
||||
creating outgoing authentication headers. The format of the \fIparam\fP
|
||||
option is:
|
||||
.IP provider1[:provider2[:region[:service]]]
|
||||
.IP provider1,\ provider2
|
||||
The providers arguments are used for generating some authentication parameters
|
||||
such as "Algorithm", "date", "request type" and "signed headers".
|
||||
.IP region
|
||||
The argument is a geographic area of a resources collection.
|
||||
It is extracted from the host name specified in the URL if omitted.
|
||||
.IP service
|
||||
The argument is a function provided by a cloud.
|
||||
It is extracted from the host name specified in the URL if omitted.
|
||||
.PP
|
||||
NOTE: This call set \fICURLOPT_HTTPAUTH(3)\fP to CURLAUTH_AWS_SIGV4.
|
||||
Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
|
||||
as calling this with \fB"aws:amz"\fP in parameter.
|
||||
.PP
|
||||
Example with "Test:Try", when curl uses the algorithm, it generates
|
||||
\fB"TEST-HMAC-SHA256"\fP for "Algorithm", \fB"x-try-date"\fP and
|
||||
\fB"X-Try-Date"\fP for "date", \fB"test4_request"\fP for "request type",
|
||||
\fB"SignedHeaders=content-type;host;x-try-date"\fP for "signed headers"
|
||||
.PP
|
||||
If you use just "test", instead of "test:try", test is used for every
|
||||
generated string.
|
||||
.SH DEFAULT
|
||||
By default, the value of this parameter is NULL.
|
||||
Calling \fICURLOPT_HTTPAUTH(3)\fP with CURLAUTH_AWS_SIGV4 is the same
|
||||
as calling this with \fB"aws:amz"\fP in parameter.
|
||||
.SH PROTOCOLS
|
||||
HTTP
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL,
|
||||
"https://service.region.example.com/uri");
|
||||
curl_easy_setopt(curl, CURLOPT_AWS_SIGV4, "provider1:provider2");
|
||||
|
||||
/* service and region can also be set in CURLOPT_AWS_SIGV4 */
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/uri");
|
||||
curl_easy_setopt(curl, CURLOPT_AWS_SIGV4,
|
||||
"provider1:provider2:region:service");
|
||||
|
||||
curl_easy_setopt(curl, CURLOPT_USERPWD, "MY_ACCESS_KEY:MY_SECRET_KEY");
|
||||
curl_easy_perform(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.75.0
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH NOTES
|
||||
This option overrides the other auth types you might have set in
|
||||
\fICURLOPT_HTTPAUTH(3)\fP which should be highlighted as this makes this auth
|
||||
method special. This method cannot be combined with other auth types.
|
||||
.PP
|
||||
A sha256 checksum of the request payload is used as input to the signature
|
||||
calculation. For POST requests, this is a checksum of the provided
|
||||
\fICURLOPT_POSTFIELDS(3)\fP. Otherwise, it's the checksum of an empty buffer.
|
||||
For requests like PUT, you can provide your own checksum in an HTTP header named
|
||||
\fBx-provider2-content-sha256\fP.
|
||||
.PP
|
||||
For \fBaws:s3\fP, a \fBx-amz-content-sha256\fP header is added to every request
|
||||
if not already present. For s3 requests with unknown payload, this header takes
|
||||
the special value "UNSIGNED-PAYLOAD".
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_HEADEROPT (3),
|
||||
.BR CURLOPT_HTTPAUTH (3),
|
||||
.BR CURLOPT_HTTPHEADER (3),
|
||||
.BR CURLOPT_PROXYAUTH (3)
|
81
deps/curl/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
vendored
Normal file
81
deps/curl/docs/libcurl/opts/CURLOPT_BUFFERSIZE.3
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_BUFFERSIZE 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_BUFFERSIZE \- receive buffer size
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_BUFFERSIZE, long size);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a long specifying your preferred \fIsize\fP (in bytes) for the receive
|
||||
buffer in libcurl. The main point of this would be that the write callback
|
||||
gets called more often and with smaller chunks. Secondly, for some protocols,
|
||||
there is a benefit of having a larger buffer for performance.
|
||||
|
||||
This is just treated as a request, not an order. You cannot be guaranteed to
|
||||
actually get the given size.
|
||||
|
||||
This buffer size is by default \fICURL_MAX_WRITE_SIZE\fP (16kB). The maximum
|
||||
buffer size allowed to be set is \fICURL_MAX_READ_SIZE\fP (10MB). The minimum
|
||||
buffer size allowed to be set is 1024.
|
||||
|
||||
DO NOT set this option on a handle that is currently used for an active
|
||||
transfer as that may lead to unintended consequences.
|
||||
|
||||
The maximum size was 512kB until 7.88.0.
|
||||
.SH DEFAULT
|
||||
CURL_MAX_WRITE_SIZE (16kB)
|
||||
.SH PROTOCOLS
|
||||
All
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "sftp://example.com/foo.bin");
|
||||
|
||||
/* ask libcurl to allocate a larger receive buffer */
|
||||
curl_easy_setopt(curl, CURLOPT_BUFFERSIZE, 120000L);
|
||||
|
||||
res = curl_easy_perform(curl);
|
||||
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.10. Growing the buffer was added in 7.53.0.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_MAX_RECV_SPEED_LARGE (3),
|
||||
.BR CURLOPT_MAXFILESIZE (3),
|
||||
.BR CURLOPT_UPLOAD_BUFFERSIZE (3),
|
||||
.BR CURLOPT_WRITEFUNCTION (3)
|
89
deps/curl/docs/libcurl/opts/CURLOPT_CAINFO.3
vendored
Normal file
89
deps/curl/docs/libcurl/opts/CURLOPT_CAINFO.3
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_CAINFO 3 "17 Jun 2014" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_CAINFO \- path to Certificate Authority (CA) bundle
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO, char *path);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a char * to a null-terminated string naming a file holding one or more
|
||||
certificates to verify the peer with.
|
||||
|
||||
If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
|
||||
server's certificate, \fICURLOPT_CAINFO(3)\fP need not even indicate an
|
||||
accessible file.
|
||||
|
||||
This option is by default set to the system path where libcurl's CA
|
||||
certificate bundle is assumed to be stored, as established at build time.
|
||||
|
||||
(iOS and macOS) When curl uses Secure Transport this option is supported. If
|
||||
the option is not set, then curl uses the certificates in the system and user
|
||||
Keychain to verify the peer.
|
||||
|
||||
(Schannel) This option is supported for Schannel in Windows 7 or later but we
|
||||
recommend not using it until Windows 8 since it works better starting then.
|
||||
If the option is not set, then curl uses the certificates in the Windows'
|
||||
store of root certificates (the default for Schannel).
|
||||
|
||||
The application does not have to keep the string around after setting this
|
||||
option.
|
||||
|
||||
The default value for this can be figured out with \fICURLINFO_CAINFO(3)\fP.
|
||||
.SH DEFAULT
|
||||
Built-in system specific. When curl is built with Secure Transport or
|
||||
Schannel, this option is not set by default.
|
||||
.SH PROTOCOLS
|
||||
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
int main(void)
|
||||
{
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO, "/etc/certs/cabundle.pem");
|
||||
curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
For the SSL engines that do not support certificate files the
|
||||
\fICURLOPT_CAINFO(3)\fP option is ignored. Schannel support added in libcurl
|
||||
7.60.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
|
||||
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLINFO_CAINFO (3),
|
||||
.BR CURLOPT_CA_CACHE_TIMEOUT (3),
|
||||
.BR CURLOPT_CAINFO_BLOB (3),
|
||||
.BR CURLOPT_CAPATH (3),
|
||||
.BR CURLOPT_SSL_VERIFYHOST (3),
|
||||
.BR CURLOPT_SSL_VERIFYPEER (3)
|
85
deps/curl/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.3
vendored
Normal file
85
deps/curl/docs/libcurl/opts/CURLOPT_CAINFO_BLOB.3
vendored
Normal file
@ -0,0 +1,85 @@
|
||||
.\" **************************************************************************
|
||||
.\" * _ _ ____ _
|
||||
.\" * Project ___| | | | _ \| |
|
||||
.\" * / __| | | | |_) | |
|
||||
.\" * | (__| |_| | _ <| |___
|
||||
.\" * \___|\___/|_| \_\_____|
|
||||
.\" *
|
||||
.\" * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||
.\" *
|
||||
.\" * This software is licensed as described in the file COPYING, which
|
||||
.\" * you should have received as part of this distribution. The terms
|
||||
.\" * are also available at https://curl.se/docs/copyright.html.
|
||||
.\" *
|
||||
.\" * 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
|
||||
.\" *
|
||||
.\" **************************************************************************
|
||||
.\"
|
||||
.TH CURLOPT_CAINFO_BLOB 3 "31 March 2021" libcurl libcurl
|
||||
.SH NAME
|
||||
CURLOPT_CAINFO_BLOB \- Certificate Authority (CA) bundle in PEM format
|
||||
.SH SYNOPSIS
|
||||
.nf
|
||||
#include <curl/curl.h>
|
||||
|
||||
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_CAINFO_BLOB,
|
||||
struct curl_blob *stblob);
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
Pass a pointer to a curl_blob structure, which contains information (pointer
|
||||
and size) about a memory block with binary data of PEM encoded content holding
|
||||
one or more certificates to verify the HTTPS server with.
|
||||
|
||||
If the blob is initialized with the flags member of struct curl_blob set to
|
||||
CURL_BLOB_COPY, the application does not have to keep the buffer around after
|
||||
setting this.
|
||||
|
||||
If \fICURLOPT_SSL_VERIFYPEER(3)\fP is zero and you avoid verifying the
|
||||
server's certificate, \fICURLOPT_CAINFO_BLOB(3)\fP is not needed.
|
||||
|
||||
This option overrides \fICURLOPT_CAINFO(3)\fP.
|
||||
.SH DEFAULT
|
||||
NULL
|
||||
.SH PROTOCOLS
|
||||
All TLS based protocols: HTTPS, FTPS, IMAPS, POP3S, SMTPS etc.
|
||||
.SH EXAMPLE
|
||||
.nf
|
||||
#include <string.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
char *strpem; /* strpem must point to a PEM string */
|
||||
CURL *curl = curl_easy_init();
|
||||
if(curl) {
|
||||
CURLcode res;
|
||||
struct curl_blob blob;
|
||||
curl_easy_setopt(curl, CURLOPT_URL, "https://example.com/");
|
||||
blob.data = strpem;
|
||||
blob.len = strlen(strpem);
|
||||
blob.flags = CURL_BLOB_COPY;
|
||||
curl_easy_setopt(curl, CURLOPT_CAINFO_BLOB, &blob);
|
||||
res = curl_easy_perform(curl);
|
||||
curl_easy_cleanup(curl);
|
||||
}
|
||||
}
|
||||
.fi
|
||||
.SH AVAILABILITY
|
||||
Added in 7.77.0.
|
||||
|
||||
This option is supported by the BearSSL (since 7.79.0), mbedTLS (since 7.81.0),
|
||||
rustls (since 7.82.0), wolfSSL (since 8.2.0), OpenSSL, Secure Transport and Schannel backends.
|
||||
.SH RETURN VALUE
|
||||
Returns CURLE_OK if the option is supported, CURLE_UNKNOWN_OPTION if not, or
|
||||
CURLE_OUT_OF_MEMORY if there was insufficient heap space.
|
||||
.SH "SEE ALSO"
|
||||
.BR CURLOPT_CAINFO (3),
|
||||
.BR CURLOPT_CAPATH (3),
|
||||
.BR CURLOPT_SSL_VERIFYPEER (3),
|
||||
.BR CURLOPT_SSL_VERIFYHOST (3)
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user