From f4bef25b5eede9ea17f237ebae52c2f89cc211cd Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 19 Oct 2004 15:30:08 +0000 Subject: CURLINFO_NUM_CONNECTS and more --- src/writeout.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src') diff --git a/src/writeout.c b/src/writeout.c index 9ba9c80a8..b60319b48 100644 --- a/src/writeout.c +++ b/src/writeout.c @@ -56,6 +56,7 @@ typedef enum { VAR_REQUEST_SIZE, VAR_EFFECTIVE_URL, VAR_CONTENT_TYPE, + VAR_NUM_CONNECTS, VAR_NUM_OF_VARS /* must be the last */ } replaceid; @@ -80,6 +81,7 @@ static struct variable replacements[]={ {"speed_download", VAR_SPEED_DOWNLOAD}, {"speed_upload", VAR_SPEED_UPLOAD}, {"content_type", VAR_CONTENT_TYPE}, + {"num_connects", VAR_NUM_CONNECTS}, {NULL, VAR_NONE} }; @@ -131,6 +133,11 @@ void ourWriteOut(CURL *curl, char *writeinfo) curl_easy_getinfo(curl, CURLINFO_REQUEST_SIZE, &longinfo)) fprintf(stream, "%ld", longinfo); break; + case VAR_NUM_CONNECTS: + if(CURLE_OK == + curl_easy_getinfo(curl, CURLINFO_NUM_CONNECTS, &longinfo)) + fprintf(stream, "%ld", longinfo); + break; case VAR_TOTAL_TIME: if(CURLE_OK == curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &doubleinfo)) -- cgit v1.2.3