summaryrefslogtreecommitdiff
path: root/lib/multiif.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2017-05-09 12:47:49 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-05-10 12:55:36 +0200
commit31b39c40cf909d34f27dc655755f346482f57089 (patch)
tree4fcf5799aebdf1573b6789f1a19ef3ac8aa0e279 /lib/multiif.h
parente9fd794a616c10bd0d017a76f8fdccaf4cc76851 (diff)
downloadcurl-31b39c40cf909d34f27dc655755f346482f57089.tar.gz
multi: use a fixed array of timers instead of malloc
... since the total amount is low this is faster, easier and reduces memory overhead. Also, Curl_expire_done() can now mark an expire timeout as done so that it never times out. Closes #1472
Diffstat (limited to 'lib/multiif.h')
-rw-r--r--lib/multiif.h20
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/multiif.h b/lib/multiif.h
index a9a7a5577..a833e23e0 100644
--- a/lib/multiif.h
+++ b/lib/multiif.h
@@ -26,28 +26,10 @@
* Prototypes for library-wide functions provided by multi.c
*/
-/* Timers */
-typedef enum {
- EXPIRE_SPEEDCHECK,
- EXPIRE_H2DATA,
- EXPIRE_PIPELINE_SEND,
- EXPIRE_PIPELINE_READ,
- EXPIRE_ADD_HANDLE,
- EXPIRE_TOOFAST,
- EXPIRE_UNPAUSE,
- EXPIRE_ARES,
- EXPIRE_MULTI_PENDING,
- EXPIRE_DNS_PER_NAME,
- EXPIRE_HAPPY_EYEBALLS,
- EXPIRE_100_TIMEOUT,
- EXPIRE_TIMEOUT,
- EXPIRE_CONNECTTIMEOUT,
- EXPIRE_LAST /* not an actual timer, used as a marker only */
-} expire_id;
-
void Curl_expire(struct Curl_easy *data, time_t milli, expire_id);
void Curl_expire_clear(struct Curl_easy *data);
void Curl_expire_latest(struct Curl_easy *data, time_t milli, expire_id);
+void Curl_expire_done(struct Curl_easy *data, expire_id id);
bool Curl_pipeline_wanted(const struct Curl_multi* multi, int bits);
void Curl_multi_handlePipeBreak(struct Curl_easy *data);