curldown: fixups

- make DEFAULT sections less repetitive

- make historic mentions use HISTORY

- generate the protocols section on `# %PROTOCOLS%` instead of guessing
  where to put it

- generate the availability section on `# %AVAILABILITY%` instead of
  guessing where to put it

- make the protocols section more verbose

Closes #14227
This commit is contained in:
Daniel Stenberg 2024-07-19 01:06:06 +02:00
parent 126cf7eccb
commit 5a488251f7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
488 changed files with 2095 additions and 119 deletions

View File

@ -148,6 +148,14 @@ readable.
To make sure curldown documents render correctly as markdown, all literal
occurrences of `<` or `>` need to be escaped by a leading backslash.
## Generating contents
`# %PROTOCOLS%` - inserts a **PROTOCOLS** section based on the metadata
provided in the header.
`# %AVAILABILITY%` - inserts an **AVAILABILITY** section based on the metadata
provided in the header.
## Symbols
All mentioned curl symbols that have their own man pages, like

View File

@ -53,6 +53,8 @@ before it is closed.
Passing in a NULL pointer in *handle* makes this function return immediately
with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -70,6 +72,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
None

View File

@ -47,6 +47,8 @@ data from the main filename to populate the cache.
In multi-threaded programs, this function must be called in a synchronous way,
the input handle may not be in use when cloned.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -65,6 +67,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns NULL, something went wrong and no valid handle was

View File

@ -64,6 +64,8 @@ To create a proper URL from strings that are not already URL encoded, we
recommend using libcurl's URL API: set the pieces with curl_url_set(3) and get
the final correct URL with curl_url_get(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -81,6 +83,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string or NULL if it failed.

View File

@ -385,6 +385,8 @@ An overview of the time values available from curl_easy_getinfo(3)
CURLINFO_PRETRANSFER_TIME_T(3), CURLINFO_STARTTRANSFER_TIME_T(3),
CURLINFO_TOTAL_TIME_T(3), CURLINFO_REDIRECT_TIME_T(3)
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -411,6 +413,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If the operation was successful, CURLE_OK is returned. Otherwise an

View File

@ -137,6 +137,8 @@ response that might happen before the "real" response.
The header is an HTTP/2 or HTTP/3 pseudo header
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -154,6 +156,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
This function returns a CURLHcode indicating success or error.

View File

@ -51,6 +51,8 @@ You are strongly advised to not allow this automatic behavior, by calling
curl_global_init(3) yourself properly. See the description in libcurl(3) of
global environment requirements for details of how to use this function.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -66,6 +68,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the

View File

@ -61,6 +61,8 @@ The memory for the struct this points to, is owned and managed by libcurl and
is associated with the easy handle. Applications must copy the data if they
want it to survive subsequent API calls or the life-time of the easy handle.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -90,6 +92,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
This function returns the next header, or NULL when there are no more

View File

@ -36,6 +36,8 @@ well.
If libcurl has no option with the given id, this function returns NULL.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -48,6 +50,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to the *curl_easyoption* struct for the option or NULL.

View File

@ -35,6 +35,8 @@ insensitive.
If libcurl has no option with the given name, this function returns NULL.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -47,6 +49,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to the *curl_easyoption* struct for the option or NULL.

View File

@ -67,6 +67,8 @@ struct curl_easyoption {
};
~~~
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -82,6 +84,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to the *curl_easyoption* struct for the next option or NULL if

View File

@ -98,6 +98,8 @@ buffering 32 megabyte of data for a paused stream.
When such a paused stream is unpaused again, any buffered data is delivered
first.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -132,6 +134,8 @@ size worth of data that curl cannot stop but instead needs to cache while the
transfer is paused. This means that if a window size of 64 MB is used, libcurl
might end up having to cache 64 MB of data.
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK (zero) means that the option was set properly, and a non-zero return

View File

@ -59,6 +59,8 @@ CURLOPT_POSTFIELDS(3).
While the **easy_handle** is added to a multi handle, it cannot be used by
curl_easy_perform(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -74,6 +76,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK (0) means everything was OK, non-zero means an error occurred as

View File

@ -58,6 +58,8 @@ Furthermore if you wait on the socket and it tells you there is data to read,
curl_easy_recv(3) may return **CURLE_AGAIN** if the only data that was
read was for internal SSL processing, and no other data is available.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -86,6 +88,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
On success, returns **CURLE_OK**, stores the received data into

View File

@ -36,6 +36,8 @@ It does not change the following information kept in the handle: live
connections, the Session ID cache, the DNS cache, the cookies, the shares or
the alt-svc cache.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -50,6 +52,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Nothing

View File

@ -53,6 +53,8 @@ Furthermore if you wait on the socket and it tells you it is writable,
curl_easy_send(3) may return **CURLE_AGAIN** if the only data that was sent
was for internal SSL processing, and no other data could be sent.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -79,6 +81,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
On success, returns **CURLE_OK** and stores the number of bytes actually

View File

@ -1327,6 +1327,8 @@ Callback for progress meter. See CURLOPT_XFERINFOFUNCTION(3)
OAuth2 bearer token. See CURLOPT_XOAUTH2_BEARER(3)
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -1342,6 +1344,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
*CURLE_OK* (zero) means that the option was set properly, non-zero means an

View File

@ -34,6 +34,8 @@ CURLcode error code passed in the argument *errornum*.
Typically applications also appreciate CURLOPT_ERRORBUFFER(3) for more
specific error descriptions generated at runtime.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -53,6 +55,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string.

View File

@ -47,6 +47,8 @@ TPF, but it was otherwise ignored.
You must curl_free(3) the returned string when you are done with it.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -67,6 +69,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string or NULL if it failed.

View File

@ -39,6 +39,8 @@ This function must be explicitly called in order to perform the upkeep work.
The connection upkeep interval is set with
CURLOPT_UPKEEP_INTERVAL_MS(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -69,6 +71,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
On success, returns **CURLE_OK**.

View File

@ -38,6 +38,8 @@ on **string** to find out the size.
You must curl_free(3) the returned string when you are done with it.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -56,6 +58,8 @@ int main(void)
Since 7.15.4, curl_easy_escape(3) should be used. This function might be
removed in a future release.
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string or NULL if it failed.

View File

@ -203,6 +203,8 @@ for the curl handle.
See example below.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -309,6 +311,8 @@ effective data size can then not be automatically determined, resulting in a
chunked encoding transfer. Backslashes and double quotes in field and
filenames are now escaped before transmission.
# %AVAILABILITY%
# RETURN VALUE
0 means everything was OK, non-zero means an error occurred corresponding to a

View File

@ -43,6 +43,8 @@ curl_formadd(3) and may be NULL.
Passing in a NULL pointer in *form* makes this function return immediately
with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -74,6 +76,8 @@ int main(void)
Deprecated in 7.56.0.
# %AVAILABILITY%
# RETURN VALUE
None

View File

@ -46,6 +46,8 @@ If the **CURLFORM_STREAM** option is used in the formpost, it prevents
curl_formget(3) from working until you have performed the actual HTTP request.
This, because first then does libcurl known which actual read callback to use!
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -66,6 +68,8 @@ size_t print_httppost(struct curl_httppost *post)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
0 means everything was OK, non-zero means an error occurred

View File

@ -33,6 +33,8 @@ differences in memory management between your application and libcurl.
Passing in a NULL pointer in *ptr* makes this function return immediately
with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -46,6 +48,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
None

View File

@ -75,6 +75,8 @@ If a decimal number of the form YYYYMMDD appears, then YYYY is read as the
year, MM as the month number and DD as the day of the month, for the specified
calendar date.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -114,6 +116,8 @@ RFC 1036) and ANSI C's *asctime()* format.
These formats are the only ones RFC 7231 says HTTP applications may use.
# %AVAILABILITY%
# RETURN VALUE
This function returns -1 when it fails to parse the date string. Otherwise it

View File

@ -31,6 +31,8 @@ systems libcurl builds on (including win32).
You must curl_free(3) the returned string when you are done with it.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -44,6 +46,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string or NULL if it failed to find the

View File

@ -60,6 +60,8 @@ depending on how OpenSSL was built and loaded as a library. It is possible in
some rare circumstances a memory leak could occur unless you implement your own
OpenSSL thread cleanup. Refer to libcurl-thread(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -73,6 +75,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
None

View File

@ -110,6 +110,8 @@ Before 7.69.0: when this flag is set, curl acknowledges EINTR condition when
connecting or when waiting for data. Otherwise, curl waits until full timeout
elapses. (Added in 7.30.0)
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -123,6 +125,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns non-zero, something went wrong and you cannot use the

View File

@ -71,6 +71,8 @@ to that man page for documentation.
Manipulating these gives considerable powers to the application to severely
screw things up for libcurl. Take care!
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -88,6 +90,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK (0) means everything was OK, non-zero means an error occurred as

View File

@ -101,6 +101,8 @@ typedef enum {
} curl_sslbackend;
~~~
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -120,6 +122,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns *CURLSSLSET_OK*, the backend was successfully

View File

@ -109,6 +109,8 @@ Traces reading of upload data from the application in order to send it to the se
Traces writing of download data, received from the server, to the application.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -132,6 +134,8 @@ of an enabled component appears at the beginning in brackets.
...
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns non-zero, something went wrong and the configuration

View File

@ -43,6 +43,8 @@ subsequently be populated using functions from the mime API.
*mime* is the handle of the mime structure in which the new part must be
appended.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -66,6 +68,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A mime part structure handle, or NULL upon failure.

View File

@ -50,6 +50,8 @@ last call is retained. It is possible to unassign part's contents by setting
Setting large data is memory consuming: one might consider using
curl_mime_data_cb(3) in such a case.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -72,6 +74,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -98,6 +98,8 @@ the pointed item to be shared between the original and the copied handle. In
particular, special attention should be given to the *freefunc* procedure
code since it then gets called twice with the same argument.
# %PROTOCOLS%
# EXAMPLE
Sending a huge data string causes the same amount of memory to be allocated:
@ -164,6 +166,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -71,6 +71,8 @@ Encoding should not be applied to multiparts, thus the use of this function on
a part with content set with curl_mime_subparts(3) is strongly
discouraged.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -96,6 +98,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -56,6 +56,8 @@ part is transferred using chunks by HTTP but is rejected by IMAP.
Setting a part's contents multiple times is valid: only the value set by the
last call is retained.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -81,6 +83,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure. CURLE_READ_ERROR is only an

View File

@ -44,6 +44,8 @@ The remote filename string is copied into the part, thus the associated
storage may safely be released or reused after call. Setting a part's file
name multiple times is valid: only the value set by the last call is retained.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -75,6 +77,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -43,6 +43,8 @@ curl_mime_init(3) and may be NULL.
Passing in a NULL pointer in *mime* makes this function return immediately
with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -61,6 +63,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
None

View File

@ -43,6 +43,8 @@ freed explicitly.
Setting a part's custom headers list multiple times is valid: only the value
set by the last call is retained.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -74,6 +76,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -42,6 +42,8 @@ reporting. Since 7.87.0, it does not need to be the final target handle.
Using a mime handle is the recommended way to post an HTTP form, format and
send a multi-part email with SMTP or upload such an email to an IMAP server.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -68,6 +70,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A mime struct handle, or NULL upon failure.

View File

@ -41,6 +41,8 @@ safely be released or reused after call. Setting a part's name multiple times
is valid: only the value set by the last call is retained. It is possible to
reset the name of a part by setting *name* to NULL.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -63,6 +65,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -42,6 +42,8 @@ Setting a part's contents multiple times is valid: only the value set by the
last call is retained. It is possible to unassign previous part's contents by
setting *subparts* to NULL.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -79,6 +81,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -54,6 +54,8 @@ extension, or application/octet-stream by default.
- text/plain in other cases.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -82,6 +84,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLE_OK or a CURL error code upon failure.

View File

@ -264,6 +264,8 @@ by the corresponding argument.
A '%' symbol is written. No argument is converted.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -276,6 +278,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
The **curl_maprintf** and **curl_mvaprintf** functions return a pointer to

View File

@ -64,6 +64,8 @@ first the easy handle and then the multi handle:
3 - curl_multi_cleanup(3)
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -82,6 +84,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -48,6 +48,8 @@ functionality.
It is acceptable to call this function from your multi callback functions.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -75,6 +77,8 @@ another socket to wait for, we can use curl_multi_assign(3) to point out the
particular data so that when we get updates about this same socket again, we
do not have to find the struct associated with this socket by ourselves.
# %AVAILABILITY%
# RETURN VALUE
The standard CURLMcode for multi interface error codes.

View File

@ -44,6 +44,8 @@ removed
Passing in a NULL pointer in *multi_handle* makes this function return
CURLM_BAD_HANDLE immediately with no other action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -58,6 +60,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code. On success,

View File

@ -79,6 +79,8 @@ which can cause crashes, or worse. The effect of NOT storing it might possibly
save you from the crash, but makes your program NOT wait for sockets it should
wait for...
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -113,6 +115,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
**CURLMcode** type, general libcurl multi interface error code. See

View File

@ -43,6 +43,8 @@ The order of the easy handles within the array is not guaranteed.
The returned array must be freed with a call to curl_free(3) after use.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -71,6 +73,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns NULL on failure. Otherwise it returns a pointer to an allocated array.

View File

@ -67,6 +67,8 @@ that just completed.
At this point, there are no other **msg** types defined.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -94,6 +96,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a filled-in struct, or NULL if it failed or ran out of

View File

@ -34,6 +34,8 @@ all the other multi-functions, sometimes referred to as a multi handle in some
places in the documentation. This init call MUST have a corresponding call to
curl_multi_cleanup(3) when the operation is complete.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -50,6 +52,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns NULL, something went wrong and you cannot use the

View File

@ -61,6 +61,8 @@ they cannot be continued. curl_multi_perform(3) should not be called
again on the same multi handle after an error has been returned, unless first
removing all the handles and adding new ones.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -89,6 +91,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -87,6 +87,8 @@ priority read events such as out of band data.
Bit flag to curl_waitfd.events indicating the socket should poll on write
events such as the socket being clear to write without blocking.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -133,6 +135,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See

View File

@ -47,6 +47,8 @@ libcurl keeps the connection alive in the connection pool associated with the
multi handle, ready to get reused for a future transfer using this multi
handle.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -67,6 +69,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -104,6 +104,8 @@ Custom pointer to pass to timer callback. See CURLMOPT_TIMERDATA(3)
Callback to receive timeout values. See CURLMOPT_TIMERFUNCTION(3)
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -118,6 +120,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
The standard CURLMcode for multi interface error codes. Note that it returns a

View File

@ -57,6 +57,8 @@ callback is far better than relying on polling the timeout value.
Usage of curl_multi_socket(3) is deprecated, whereas the function is
equivalent to curl_multi_socket_action(3) with **ev_bitmask** set to 0.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -76,6 +78,8 @@ int main(void)
curl_multi_socket(3) is deprecated, use curl_multi_socket_action(3) instead!
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -96,6 +96,8 @@ callback has been told.
socket(s) that got action. If no activity is detected and the timeout expires,
call curl_multi_socket_action(3) with *CURL_SOCKET_TIMEOUT*.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -113,6 +115,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See

View File

@ -41,6 +41,8 @@ Force libcurl to (re-)check all its internal sockets and transfers instead of
just a single one by calling curl_multi_socket_all(3). Note that there should
not be any reason to use this function.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -53,6 +55,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -31,6 +31,8 @@ const char *curl_multi_strerror(CURLMcode errornum);
This function returns a string describing the *CURLMcode* error code
passed in the argument *errornum*.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -45,6 +47,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string.

View File

@ -49,6 +49,8 @@ Note: if libcurl returns a -1 timeout here, it just means that libcurl
currently has no stored timeout value. You must not wait too long (more than a
few seconds perhaps) before you call curl_multi_perform(3) again.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -83,6 +85,8 @@ out which sockets to wait for by calling curl_multi_fdset(3).
When there is activity or timeout, call curl_multi_perform(3) and then
loop - until all transfers are complete.
# %AVAILABILITY%
# RETURN VALUE
The standard CURLMcode for multi interface error codes.

View File

@ -80,6 +80,8 @@ priority read events such as out of band data.
Bit flag to *curl_waitfd.events* indicating the socket should poll on
write events such as the socket being clear to write without blocking.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -114,6 +116,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code. See

View File

@ -52,6 +52,8 @@ The client code can pass *size* equal to zero just to get the number of the
descriptors and allocate appropriate storage for them to be used in a
subsequent function call.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -100,6 +102,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
**CURLMcode** type, general libcurl multi interface error code. See

View File

@ -39,6 +39,8 @@ that multiple calls to this function wake up the same waiting operation.
This function has no effect on curl_multi_wait(3) calls.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -85,6 +87,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLMcode type, general libcurl multi interface error code.

View File

@ -36,6 +36,8 @@ not have to loop through all headers to find the one it is interested in. The
data this function points to is freed when this callback returns. If more than
one header field use the same name, this returns only the first one.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -76,6 +78,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a pointer to the header field content or NULL.

View File

@ -35,6 +35,8 @@ the incoming server push request or NULL. The data pointed to is freed by
libcurl when this callback returns. The returned pointer points to a
"name:value" string that gets freed when this callback returns.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -63,6 +65,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a pointer to the header field content or NULL.

View File

@ -32,6 +32,8 @@ when this function has been called.
Passing in a NULL pointer in *share_handle* makes this function return
immediately with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -45,6 +47,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLSHE_OK (zero) means that the option was set properly, non-zero means an

View File

@ -36,6 +36,8 @@ This *share handle* is what you pass to curl using the
CURLOPT_SHARE(3) option with curl_easy_setopt(3), to make that
specific curl handle use the data in this share.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -49,6 +51,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
If this function returns NULL, something went wrong (out of memory, etc.)

View File

@ -50,6 +50,8 @@ See CURLSHOPT_UNSHARE(3).
See CURLSHOPT_USERDATA(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -63,6 +65,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
CURLSHE_OK (zero) means that the option was set properly, non-zero means an

View File

@ -31,6 +31,8 @@ const char *curl_share_strerror(CURLSHcode errornum);
The curl_share_strerror(3) function returns a string describing the
*CURLSHcode* error code passed in the argument *errornum*.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -44,6 +46,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string.

View File

@ -35,6 +35,8 @@ returns. curl_slist_append(3) copies the string.
The list should be freed again (after usage) with
curl_slist_free_all(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -66,6 +68,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A null pointer is returned if anything went wrong, otherwise the new list

View File

@ -31,6 +31,8 @@ linked list.
Passing in a NULL pointer in *list* makes this function return immediately
with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -52,6 +54,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Nothing.

View File

@ -39,6 +39,8 @@ This function is provided by libcurl to enable applications to compare strings
in a truly portable manner. There are no standard portable case insensitive
string comparison functions. This function works on all platforms.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -50,6 +52,8 @@ int main(int argc, char **argv)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Non-zero if the strings are identical. Zero if they are not.

View File

@ -42,6 +42,8 @@ This function is provided by libcurl to enable applications to compare strings
in a truly portable manner. There are no standard portable case insensitive
string comparison functions. This function works on all platforms.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -53,6 +55,8 @@ int main(int argc, char **argv)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Non-zero if the strings are identical. Zero if they are not.

View File

@ -40,6 +40,8 @@ strlen() on **input** to find out the size.
You must curl_free(3) the returned string when you are done with it.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -63,6 +65,8 @@ int main(void)
Since 7.15.4, curl_easy_unescape(3) should be used. This function might
be removed in a future release.
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string or NULL if it failed.

View File

@ -38,6 +38,8 @@ single URL. When the object is first created, there is of course no components
stored. They are then set in the object with the curl_url_set(3)
function.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -58,6 +60,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a **CURLU *** if successful, or NULL if out of memory.

View File

@ -34,6 +34,8 @@ Frees all the resources associated with the given *CURLU* handle!
Passing in a NULL pointer in *handle* makes this function return
immediately with no action.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -45,6 +47,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
none

View File

@ -33,6 +33,8 @@ Duplicates the URL object the input *CURLU* *inhandle* identifies and
returns a pointer to the copy as a new *CURLU* handle. The new handle also
needs to be freed with curl_url_cleanup(3).
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -50,6 +52,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a new handle or NULL if out of memory.

View File

@ -216,6 +216,8 @@ A not-present fragment returns *part* set to NULL.
A zero-length fragment returns *part* as NULL unless CURLU_GET_EMPTY is set.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -236,6 +238,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a CURLUcode error value, which is CURLUE_OK (0) if everything went

View File

@ -240,6 +240,8 @@ If set, the URL parser does not accept embedded credentials for the
**CURLUPART_URL**, and instead returns **CURLUE_USER_NOT_ALLOWED** for
such URLs.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -256,6 +258,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns a *CURLUcode* error value, which is CURLUE_OK (0) if everything

View File

@ -33,6 +33,8 @@ const char *curl_url_strerror(CURLUcode errornum);
This function returns a string describing the CURLUcode error code passed in
the argument *errornum*.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -47,6 +49,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string.

View File

@ -30,6 +30,8 @@ its important components (like OpenSSL version).
We recommend using curl_version_info(3) instead!
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -39,6 +41,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a null-terminated string. The string resides in a statically

View File

@ -370,6 +370,8 @@ supports HTTP GSS-Negotiate (added in 7.10.6, deprecated in 7.38.0)
supports Kerberos V4 (when using FTP). Legacy bit. Deprecated since 7.33.0.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -383,6 +385,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
A pointer to a curl_version_info_data struct.

View File

@ -98,6 +98,8 @@ This transfer is now closed.
This as an incoming ping message, that expects a pong response.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -133,6 +135,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
This function returns a pointer to a *curl_ws_frame* struct with read-only

View File

@ -44,6 +44,8 @@ The *meta* pointer gets set to point to a *const struct curl_ws_frame*
that contains information about the received data. See the
curl_ws_meta(3) for details on that struct.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -61,6 +63,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns **CURLE_OK** if everything is okay, and a non-zero number for

View File

@ -90,6 +90,8 @@ fragment like this, the *fragsize* must be provided with the total
expected fragment size in the first call and it needs to be zero in subsequent
calls.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -112,6 +114,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
*CURLE_OK* (zero) means that the data was sent properly, non-zero means an

View File

@ -41,6 +41,8 @@ CURLOPT_CONNECT_ONLY(3), which skips the transfer phase.
CURLINFO_ACTIVESOCKET(3) was added as a replacement for
CURLINFO_LASTSOCKET(3) since that one is not working on all platforms.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -72,6 +74,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -38,6 +38,8 @@ When a redirect is followed, the time from each request is added together.
See also the TIMES overview in the curl_easy_getinfo(3) man page.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -61,6 +63,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -38,6 +38,8 @@ When a redirect is followed, the time from each request is added together.
See also the TIMES overview in the curl_easy_getinfo(3) man page.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -62,6 +64,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -41,6 +41,8 @@ This is a path identifying a single file containing CA certificates.
The **path** pointer is set to NULL if there is no default path.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -58,6 +60,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -44,6 +44,8 @@ This is a path identifying a directory.
The **path** pointer is set to NULL if there is no default path.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -61,6 +63,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -51,6 +51,8 @@ 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.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -92,11 +94,13 @@ int main(void)
See also the *certinfo.c* example.
# NOTES
# HISTORY
GnuTLS support added in 7.42.0. Schannel support added in 7.50.0. Secure
Transport support added in 7.79.0. mbedTLS support added in 8.9.0.
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -37,6 +37,8 @@ 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.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -70,6 +72,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -34,6 +34,8 @@ When a redirect is followed, the time from each request is added together.
See also the TIMES overview in the curl_easy_getinfo(3) man page.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -57,6 +59,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -36,6 +36,8 @@ When a redirect is followed, the time from each request is added together.
See also the TIMES overview in the curl_easy_getinfo(3) man page.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -60,6 +62,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -35,6 +35,8 @@ 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.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -60,6 +62,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -35,6 +35,8 @@ is the value read from the Content-Length: field. Since 7.19.4, this returns
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T(3) is a newer replacement that returns a more
sensible variable type.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -64,6 +66,8 @@ int main(void)
Deprecated since 7.55.0.
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -32,6 +32,8 @@ Pass a pointer to a *curl_off_t* 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.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -57,6 +59,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -34,6 +34,8 @@ Pass a pointer to a double to receive the specified size of the upload. Since
CURLINFO_CONTENT_LENGTH_UPLOAD_T(3) is a newer replacement that returns a
more sensible variable type.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -63,6 +65,8 @@ int main(void)
Deprecated since 7.55.0.
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

View File

@ -31,6 +31,8 @@ CURLcode curl_easy_getinfo(CURL *handle, CURLINFO_CONTENT_LENGTH_UPLOAD_T,
Pass a pointer to a *curl_off_t* to receive the specified size of the
upload. Stores -1 if the size is not known.
# %PROTOCOLS%
# EXAMPLE
~~~c
@ -56,6 +58,8 @@ int main(void)
}
~~~
# %AVAILABILITY%
# RETURN VALUE
Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not.

Some files were not shown because too many files have changed in this diff Show More