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:
Daniel Stenberg
2006-02-11 22:35:16 +00:00
parent b0bc2f00d2
commit 87bcb6f377
13 changed files with 119 additions and 48 deletions

View File

@@ -856,6 +856,7 @@ struct UrlState {
set, it holds an allocated connection. */
struct connectdata **connects;
long numconnects; /* size of the 'connects' array */
int lastconnect; /* index of most recent connect or -1 if undefined */
char *headerbuff; /* allocated buffer to store headers in */
size_t headersize; /* size of the allocation */
@@ -1083,6 +1084,7 @@ struct UserDefined {
bool ignorecl; /* ignore content length */
bool ftp_skip_ip; /* skip the IP address the FTP server passes on to
us */
bool connect_only; /* make connection, let application use the socket */
};
/*