summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
authorzhenwei pi <pizhenwei@bytedance.com>2022-08-30 11:44:01 +0800
committerMichael Grunder <michael.grunder@gmail.com>2022-09-02 10:25:52 -0700
commitfce8abc1c19ab731f5c84797aa71b4d49921913f (patch)
treece362bac272df3eb6c7ef1039110f830a12f2f90 /hiredis.h
parentcfb6ca881132f7d44121935f55493e144511fbb6 (diff)
Introduce .close method for redisContextFuncs
Currently, hiredis supports TCP/SSL/Unix, all of the connection types use a single FD(int), close() is enough to close a connection. For the further step, introduce .close method for redisContextFuncs, this allows to close a complex connection context, for example RDMA. Signed-off-by: zhenwei pi <pizhenwei@bytedance.com>
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/hiredis.h b/hiredis.h
index 41cab2d..5969368 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -245,6 +245,7 @@ typedef struct {
} while(0)
typedef struct redisContextFuncs {
+ void (*close)(struct redisContext *);
void (*free_privctx)(void *);
void (*async_read)(struct redisAsyncContext *);
void (*async_write)(struct redisAsyncContext *);