diff options
author | Gokhan Sengun <gokhansengun@gmail.com> | 2011-12-19 14:35:20 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2011-12-20 20:30:02 +0100 |
commit | c834213ad52c52431e9ca597862dc81839cabe84 (patch) | |
tree | 678dfd82d3129b8aef8a0222defc55244003203b /include | |
parent | 5527417afae062d7a2b12ee80730a0ab22b86eab (diff) |
FTP: perform active connections non-blocking
1- Two new error codes are introduced.
CURLE_FTP_ACCEPT_FAILED to be set whenever ACCEPTing fails because of
FTP server connected.
CURLE_FTP_ACCEPT_TIMEOUT to be set whenever ACCEPTing timeouts.
Neither of these errors are considered fatal and control connection
remains OK because it could just be a firewall blocking server to
connect to the client.
2- One new setopt option was introduced.
CURLOPT_ACCEPTTIMEOUT_MS
It sets the maximum amount of time FTP client is going to wait for a
server to connect. Internal default accept timeout is 60 seconds.
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/curl.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/curl/curl.h b/include/curl/curl.h index 1e908a3ec..f53d6d446 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -411,9 +411,12 @@ typedef enum { CURLE_REMOTE_ACCESS_DENIED, /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */ - CURLE_OBSOLETE10, /* 10 - NOT USED */ + CURLE_FTP_ACCEPT_FAILED, /* 10 - [was obsoleted in April 2006 for + 7.15.4, reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASS_REPLY, /* 11 */ - CURLE_OBSOLETE12, /* 12 - NOT USED */ + CURLE_FTP_ACCEPT_TIMEOUT, /* 12 - timeout occurred accepting server + [was obsoleted in August 2007 for 7.17.0, + reused in Dec 2011 for 7.24.0]*/ CURLE_FTP_WEIRD_PASV_REPLY, /* 13 */ CURLE_FTP_WEIRD_227_FORMAT, /* 14 */ CURLE_FTP_CANT_GET_HOST, /* 15 */ @@ -511,7 +514,6 @@ typedef enum { CURLE_RTSP_SESSION_ERROR, /* 86 - mismatch of RTSP Session Ids */ CURLE_FTP_BAD_FILE_LIST, /* 87 - unable to parse FTP file list */ CURLE_CHUNK_FAILED, /* 88 - chunk callback reported error */ - CURL_LAST /* never use! */ } CURLcode; @@ -1489,6 +1491,10 @@ typedef enum { /* Set the name servers to use for DNS resolution */ CINIT(DNS_SERVERS, OBJECTPOINT, 211), + /* Time-out accept operations (currently for FTP only) after this amount + of miliseconds. */ + CINIT(ACCEPTTIMEOUT_MS, LONG, 212), + CURLOPT_LASTENTRY /* the last unused */ } CURLoption; |