diff options
author | Daniel Stenberg <daniel@haxx.se> | 2006-02-11 22:35:16 +0000 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2006-02-11 22:35:16 +0000 |
commit | 87bcb6f3775a437579c7526d0972c714c2e5d31d (patch) | |
tree | e3b1729ce92ff0ab994b7e904f0bca5bd018a060 /lib/transfer.c | |
parent | b0bc2f00d2ef005b6322123799af78528f66b713 (diff) |
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.
Diffstat (limited to 'lib/transfer.c')
-rw-r--r-- | lib/transfer.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/transfer.c b/lib/transfer.c index 50a8bae98..2fbc2c615 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -2159,6 +2159,12 @@ CURLcode Curl_perform(struct SessionHandle *data) if(res == CURLE_OK) { bool do_done; + if(data->set.connect_only) { + /* keep connection open for application to use the socket */ + conn->bits.close = FALSE; + res = Curl_done(&conn, CURLE_OK); + break; + } res = Curl_do(&conn, &do_done); /* for non 3rd party transfer only */ |