From 87bcb6f3775a437579c7526d0972c714c2e5d31d Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sat, 11 Feb 2006 22:35:16 +0000 Subject: Karl M added the CURLOPT_CONNECT_ONLY and CURLINFO_LASTSOCKET options that an app can use to let libcurl only connect to a remote host and then extract the socket from libcurl. libcurl will then not attempt to do any transfer at all after the connect is done. --- include/curl/curl.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index 95c478a07..1ad282df8 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -923,6 +923,10 @@ typedef enum { */ CINIT(LOCALPORTRANGE, LONG, 140), + /* no transfer, set up connection and let application use the socket by + extracting it with CURLINFO_LASTSOCKET */ + CINIT(CONNECT_ONLY, LONG, 141), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; @@ -1277,9 +1281,10 @@ typedef enum { CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, + CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, /* Fill in new entries below here! */ - CURLINFO_LASTONE = 28 + CURLINFO_LASTONE = 29 } CURLINFO; /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as -- cgit v1.2.3