diff options
author | Daniel Stenberg <daniel@haxx.se> | 2004-10-19 15:30:08 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2004-10-19 15:30:08 +0000 |
commit | f4bef25b5eede9ea17f237ebae52c2f89cc211cd (patch) | |
tree | 35670c54ced8bfe2821af24151fae4c84ad79b84 /src | |
parent | ebf7d225036bb060402ee6a66988a3de877cdd1a (diff) |
CURLINFO_NUM_CONNECTS and more
Diffstat (limited to 'src')
-rw-r--r-- | src/writeout.c | 7 |
1 files changed, 7 insertions, 0 deletions
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)) |