summaryrefslogtreecommitdiff
path: root/lib/connect.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2008-02-07 22:25:04 +0000
committerDaniel Stenberg <daniel@haxx.se>2008-02-07 22:25:04 +0000
commit1b701c746f66b8fd5bf3017c36254dbde8456df2 (patch)
tree9ce8d20c20100c4fb9bbec0966928641f9f910b7 /lib/connect.h
parent15bf16852705a585b694cb0d50d21f7edd6b7a88 (diff)
downloadcurl-1b701c746f66b8fd5bf3017c36254dbde8456df2.tar.gz
- Refactored a lot of timeout code into a few functions in an attempt to make
them all use the same (hopefully correct) logic to make it less error-prone and easier to introduce library-wide where it should be used.
Diffstat (limited to 'lib/connect.h')
-rw-r--r--lib/connect.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/lib/connect.h b/lib/connect.h
index 3bfe722ea..78c0191ba 100644
--- a/lib/connect.h
+++ b/lib/connect.h
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -31,14 +31,20 @@ CURLcode Curl_is_connected(struct connectdata *conn,
bool *connected);
CURLcode Curl_connecthost(struct connectdata *conn,
- const struct Curl_dns_entry *host, /* connect to this */
+ const struct Curl_dns_entry *host, /* connect to
+ this */
curl_socket_t *sockconn, /* not set if error */
Curl_addrinfo **addr, /* the one we used */
- bool *connected /* truly connected? */
- );
+ bool *connected); /* truly connected? */
CURLcode Curl_store_ip_addr(struct connectdata *conn);
+/* generic function that returns how much time there's left to run, according
+ to the timeouts set */
+long Curl_timeleft(struct connectdata *conn,
+ struct timeval *nowp,
+ bool duringconnect);
+
#define DEFAULT_CONNECT_TIMEOUT 300000 /* milliseconds == five minutes */
#endif