summaryrefslogtreecommitdiff
path: root/hiredis.h
diff options
context:
space:
mode:
Diffstat (limited to 'hiredis.h')
-rw-r--r--hiredis.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/hiredis.h b/hiredis.h
index 20e9bfa..fe2dae4 100644
--- a/hiredis.h
+++ b/hiredis.h
@@ -176,8 +176,10 @@ typedef struct {
int type;
/* bit field of REDIS_OPT_xxx */
int options;
- /* timeout value. if NULL, no timeout is used */
- const struct timeval *timeout;
+ /* timeout value for connect operation. if NULL, no timeout is used */
+ const struct timeval *connect_timeout;
+ /* timeout value for commands. if NULL, no timeout is used. (can be set later on with redisSetTimeout/redisAsyncSetTimeout) */
+ const struct timeval *command_timeout;
union {
/** use this field for tcp/ip connections */
struct {
@@ -230,7 +232,8 @@ typedef struct redisContext {
redisReader *reader; /* Protocol reader */
enum redisConnectionType connection_type;
- struct timeval *timeout;
+ struct timeval *connect_timeout;
+ struct timeval *command_timeout;
struct {
char *host;