diff options
author | Viktor Söderqvist <viktor.soderqvist@est.tech> | 2023-05-29 22:25:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-29 13:25:34 -0700 |
commit | b6a052fe0959dae69e16b9d74449faeb1b70dbe1 (patch) | |
tree | 9bf6d4456e0d2e0cc73f55fea5b6c764eb3ab156 /hiredis.c | |
parent | 3fa9b69443aa306b8219fc47aaffecd76e13a9ab (diff) |
Helper for setting TCP_USER_TIMEOUT socket option (#1188)
* Implement redisSetTcpUserTimeout to set socket option TCP_USER_TIMEOUT
* Documentation for redisSetTcpUserTimeout and some more undocumented functions
Documentation for redisReconnect() and the setters of socket options:
* redisKeepAlive()
* redisEnableKeepAliveWithInterval()
* redisSetTcpUserTimeout()
Diffstat (limited to 'hiredis.c')
-rw-r--r-- | hiredis.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -953,6 +953,11 @@ int redisEnableKeepAlive(redisContext *c) { return redisKeepAlive(c, REDIS_KEEPALIVE_INTERVAL); } +/* Set the socket option TCP_USER_TIMEOUT. */ +int redisSetTcpUserTimeout(redisContext *c, unsigned int timeout) { + return redisContextSetTcpUserTimeout(c, timeout); +} + /* Set a user provided RESP3 PUSH handler and return any old one set. */ redisPushFn *redisSetPushCallback(redisContext *c, redisPushFn *fn) { redisPushFn *old = c->push_cb; |