summaryrefslogtreecommitdiff
path: root/lib/cfilters.h
diff options
context:
space:
mode:
authorStefan Eissing <stefan@eissing.org>2022-11-21 15:40:26 +0100
committerDaniel Stenberg <daniel@haxx.se>2022-11-22 08:20:38 +0100
commit4a8b4a1b6635f1dc811b65a9355b89f0277da1f2 (patch)
tree4f1a03fd881b915e6cae0f3a08ccc6303e5cc7ca /lib/cfilters.h
parentb7413a66bd01cd5b6f7acbfffa5e39ec9db99d42 (diff)
downloadcurl-4a8b4a1b6635f1dc811b65a9355b89f0277da1f2.tar.gz
cfiler: filter types have flags indicating what they do
- Adding Curl_conn_is_ip_connected() to check if network connectivity has been reached - having ftp wait for network connectivity before proceeding with transfers. Fixes test failures 1631 and 1632 with hyper. Closes #9952
Diffstat (limited to 'lib/cfilters.h')
-rw-r--r--lib/cfilters.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/cfilters.h b/lib/cfilters.h
index 6fb031eca..9950b6656 100644
--- a/lib/cfilters.h
+++ b/lib/cfilters.h
@@ -83,9 +83,13 @@ typedef void Curl_cf_detach_data(struct Curl_cfilter *cf,
*/
void Curl_cfilter_detach(struct connectdata *conn, struct Curl_easy *data);
+#define CF_TYPE_IP_CONNECT (1 << 0)
+#define CF_TYPE_SSL (1 << 1)
+
/* A connection filter type, e.g. specific implementation. */
struct Curl_cftype {
const char *name; /* name of the filter type */
+ long flags; /* flags of filter type */
Curl_cf_destroy *destroy; /* destroy resources held */
Curl_cf_attach_data *attach_data; /* data is being handled here */
Curl_cf_detach_data *detach_data; /* data is no longer handled here */
@@ -164,6 +168,12 @@ CURLcode Curl_cfilter_connect(struct Curl_easy *data,
bool blocking, bool *done);
bool Curl_cfilter_is_connected(struct Curl_easy *data,
struct connectdata *conn, int sockindex);
+/**
+ * Determine if we have reached the remote host on IP level, e.g.
+ * have a TCP connection. This turns TRUE before a possible SSL
+ * handshake has been started/done.
+ */
+bool Curl_conn_is_ip_connected(struct Curl_easy *data, int sockindex);
void Curl_cfilter_close(struct Curl_easy *data,
struct connectdata *conn, int index);