mirror of
https://github.com/curl/curl.git
synced 2026-08-06 07:16:14 +03:00
upkeep: add a connection upkeep API: curl_easy_conn_upkeep()
Add functionality so that protocols can do custom keepalive on their connections, when an external API function is called. Add docs for the new options in 7.62.0 Closes #1641
This commit is contained in:
parent
6684653b68
commit
7b655fcbad
15 changed files with 280 additions and 2 deletions
|
|
@ -803,6 +803,9 @@ typedef enum {
|
|||
this value, keep them in sync. */
|
||||
#define CURL_HET_DEFAULT 200L
|
||||
|
||||
/* The default connection upkeep interval in milliseconds. */
|
||||
#define CURL_UPKEEP_INTERVAL_DEFAULT 60000L
|
||||
|
||||
#ifndef CURL_NO_OLDIES /* define this to test if your app builds with all
|
||||
the obsolete stuff removed! */
|
||||
|
||||
|
|
@ -1865,6 +1868,9 @@ typedef enum {
|
|||
/* Preferred buffer size to use for uploads */
|
||||
CINIT(UPLOAD_BUFFERSIZE, LONG, 280),
|
||||
|
||||
/* Time in ms between connection upkeep calls for long-lived connections. */
|
||||
CINIT(CONN_UPKEEP_INTERVAL_MS, LONG, 281),
|
||||
|
||||
CURLOPT_LASTENTRY /* the last unused */
|
||||
} CURLoption;
|
||||
|
||||
|
|
|
|||
|
|
@ -95,6 +95,16 @@ CURL_EXTERN CURLcode curl_easy_recv(CURL *curl, void *buffer, size_t buflen,
|
|||
CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
|
||||
size_t buflen, size_t *n);
|
||||
|
||||
|
||||
/*
|
||||
* NAME curl_easy_conn_upkeep()
|
||||
*
|
||||
* DESCRIPTION
|
||||
*
|
||||
* Performs connection upkeep for the given session handle.
|
||||
*/
|
||||
CURL_EXTERN CURLcode curl_easy_conn_upkeep(CURL *curl);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue