summaryrefslogtreecommitdiff
path: root/hiredis.c
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.c')
-rw-r--r--hiredis.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hiredis.c b/hiredis.c
index 9b74b5b..beed8e9 100644
--- a/hiredis.c
+++ b/hiredis.c
@@ -1049,6 +1049,14 @@ redisContext *redisConnectNonBlock(const char *ip, int port) {
return c;
}
+redisContext *redisConnectBindNonBlock(const char *ip, int port,
+ char *source_addr) {
+ redisContext *c = redisContextInit();
+ c->flags &= ~REDIS_BLOCK;
+ redisContextConnectBindTcp(c,ip,port,NULL,source_addr);
+ return c;
+}
+
redisContext *redisConnectUnix(const char *path) {
redisContext *c;