summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorViktor Söderqvist <viktor.soderqvist@est.tech>2022-09-01 12:04:59 +0200
committerMichael Grunder <michael.grunder@gmail.com>2022-09-01 10:42:36 -0700
commit10c78c6e179a32b3e1f9cd99bf18dcf0c37d295e (patch)
tree36ea03abf4c9351a374e92a201c3c8cdc60788a3 /hiredis.h
parent1abe0c8285100e31a4688b3b09023eb3ad942394 (diff)
Add possibility to prefer IPv6, IPv4 or unspecified
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index 7e2a84d..1cbdde4 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -92,6 +92,11 @@ typedef long long ssize_t;
/* Flag that indicates the user does not want replies to be automatically freed */
#define REDIS_NO_AUTO_FREE_REPLIES 0x400
+/* Flags to prefer IPv6 or IPv4 when doing DNS lookup. (If both are set,
+ * AF_UNSPEC is used.) */
+#define REDIS_PREFER_IPV4 0x800
+#define REDIS_PREFER_IPV6 0x1000
+
#define REDIS_KEEPALIVE_INTERVAL 15 /* seconds */
/* number of times we retry to connect in the case of EADDRNOTAVAIL and
@@ -149,6 +154,8 @@ struct redisSsl;
#define REDIS_OPT_NONBLOCK 0x01
#define REDIS_OPT_REUSEADDR 0x02
+#define REDIS_OPT_PREFER_IPV4 0x04
+#define REDIS_OPT_PREFER_IPV6 0x08
/**
* Don't automatically free the async object on a connection failure,