diff options
author | Daniel Stenberg <daniel@haxx.se> | 2008-07-03 06:56:03 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2008-07-03 06:56:03 +0000 |
commit | 7c648782bc7c97be81c619acd8598c38b59c5832 (patch) | |
tree | 19083e2f56b425701f0e44abcfe69e60e608aa40 /lib/sslgen.c | |
parent | ee64d14733266ce533eeb3cbc86bd80212527b81 (diff) |
Introcuding a new timestamp for curl_easy_getinfo():
CURLINFO_APPCONNECT_TIME. This is set with the "application layer"
handshake/connection is completed (typically SSL, TLS or SSH). By using this
you can figure out the application layer's own connect time. You can extract
the time stamp using curl's -w option and the new variable named
'time_appconnect'. This feature was sponsored by Lenny Rachitsky at NeuStar.
Diffstat (limited to 'lib/sslgen.c')
-rw-r--r-- | lib/sslgen.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/sslgen.c b/lib/sslgen.c index a6824090d..0001cd8d3 100644 --- a/lib/sslgen.c +++ b/lib/sslgen.c @@ -60,6 +60,7 @@ #include "strequal.h" #include "url.h" #include "memory.h" +#include "progress.h" /* The last #include file should be: */ #include "memdebug.h" @@ -178,11 +179,17 @@ void Curl_ssl_cleanup(void) CURLcode Curl_ssl_connect(struct connectdata *conn, int sockindex) { + CURLcode res; /* mark this is being ssl-enabled from here on. */ conn->ssl[sockindex].use = TRUE; conn->ssl[sockindex].state = ssl_connection_negotiating; - return curlssl_connect(conn, sockindex); + res = curlssl_connect(conn, sockindex); + + if(!res) + Curl_pgrsTime(conn->data, TIMER_APPCONNECT); /* SSL is connected */ + + return res; } CURLcode @@ -192,7 +199,7 @@ Curl_ssl_connect_nonblocking(struct connectdata *conn, int sockindex, #ifdef curlssl_connect_nonblocking /* mark this is being ssl requested from here on. */ conn->ssl[sockindex].use = TRUE; - return Curl_ossl_connect_nonblocking(conn, sockindex, done); + return curlssl_connect_nonblocking(conn, sockindex, done); #else *done = TRUE; /* fallback to BLOCKING */ conn->ssl[sockindex].use = TRUE; |