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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user