summaryrefslogtreecommitdiff
path: root/hiredis.h
AgeCommit message (Collapse)Author
2023-07-13Bump development SONAME.michael-grunder
2023-07-12Version 1.2.0 (#1202)Chayim
Co-authored-by: Michael Grunder <michael.grunder@gmail.com>
2023-05-29Helper for setting TCP_USER_TIMEOUT socket option (#1188)Viktor Söderqvist
* 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()
2023-03-13Fix colliding option valuesViktor Söderqvist
2023-03-07Allow specifying the keepalive intervalmichael-grunder
Fixes #1155
2022-11-15Bump dev version for the next release cycle.michael-grunder
2022-11-14Prepare for v1.1.0 GAmichael-grunder
2022-11-09Update version in dev branch.michael-grunder
2022-11-06Prepare for v1.1.0-rc1michael-grunder
- Update changelog. - Bump version/soname defines.
2022-09-05Fix protocol error (#1106)Michael Grunder
Fix ProtocolError This commit attempts to fix hiredis such that a recoverable write error will be retried rather than throwing a hard error. Since our read/write functions are now behind function pointers, we specify semantically that a return value of < 0 is a hard error, 0 a recoverable error, and > 0 a success. Our default `redisNetRead` function was already doing something similar so this also improves code consistency. Resolves #961 Co-authored-by: Maksim Tuleika <maksim.tuleika@appcast.io>
2022-09-02Introduce .close method for redisContextFuncszhenwei pi
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>
2022-09-02Add REDIS_OPT_PREFER_UNSPEC (#1101)Michael Grunder
Add REDIS_OPT_PREFER_UNSPEC See: #1099, #1096 Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech> Co-authored-by: Viktor Söderqvist <viktor.soderqvist@est.tech>
2022-09-01Add possibility to prefer IPv6, IPv4 or unspecifiedViktor Söderqvist
2022-08-30Add do while(0) protection for macrosPei-Hsuan Hung
Wrapping multi-line macros in do...while(0) statement prevents potential dangling else problem.
2021-12-22Fix integer overflow when format command larger than 4GB (#1030)sundb
2021-12-22Handle array response in parallell with pubsub using RESP3 (#1014)Bjorn Svensson
RESP3 allows sending commands in parallell with pubsub handling and these commands might get responded with a REDIS_REPLY_ARRAY. This conflicts with the pubsub response handling for RESP2 and results in a faulty state when using RESP3. Add functionality to keep track of PUSH/RESP3 support on the connection and only expect the message type REDIS_REPLY_PUSH as subscribe messages when once seen.
2021-10-07Merge branch 'release/v1.0.2'michael-grunder
2021-10-07Revert erroneous SONAME bumpmichael-grunder
2021-10-04Merge branch 'release/v1.0.1'michael-grunder
Merge the v1.0.1 release branch and bump the dev version to 1.0.2-dev
2021-10-04 Prepare for v1.0.1 GAmichael-grunder
2021-07-11Added REDIS_NO_AUTO_FREE_REPLIES flag (#962)Meir Shpilraien (Spielrein)
When set hiredis will not automatically free replies in an async context, and the replies must be freed instead by the user. Co-authored-by: Michael Grunder <michael.grunder@gmail.com>
2021-02-25read: Add support for the RESP3 bignum typeAlex Smith
2020-08-20Fix sockaddr typomichael-grunder
Fixes #867
2020-08-03Prepare for v1.0.0 GAmichael-grunder
2020-07-31Use development specific versions in mastermichael-grunder
Avoids issues like #860
2020-07-29Update notes preparing for v1.0.0-rc1michael-grunder
2020-07-29Move SSL management to a distinct private pointer. (#855)Michael Grunder
We need to allow our users to use redisContext->privdata as context for any RESP3 PUSH messages, which means we can't use it for managing SSL connections. Bulletpoints: * Create a secondary redisContext member for internal use only called privctx and rename the redisContextFuncs->free_privdata accordingly. * Adds a `free_privdata` function pointer so the user can tie allocated memory to the lifetime of a redisContext (like they can already do with redisAsyncContext) * Enables SSL tests in .travis.yml
2020-07-26Minor refactor for scheduling an async timer. (#854)Michael Grunder
Small change to the logic introduced in #839
2020-07-26add a command_timeout to redisContextOptions (#839)valentinogeron
Add an additional timeout so the user has a convenient way of controlling distinct connect and command timeouts
2020-07-19Resp3 oob push support (#841)Michael Grunder
Proper support for RESP3 PUSH messages. By default, PUSH messages are now intercepted and the reply memory freed. This means existing code should work unchanged when connecting to Redis >= 6.0.0 even if `CLIENT TRACKING` were then enabled. Additionally, we define two callbacks users can configure if they wish to handle these messages in a custom way: void redisPushFn(void *privdata, void *reply); void redisAsyncPushFn(redisAsyncContext *ac, void *reply); See #825
2020-06-07sdsrange overflow fix (#830)Michael Grunder
Fix overflow bug in `sdsrange`
2020-05-19Resp3 verbatim string support (#805)Michael Grunder
Pull RESP3 verbatim string handling from Redis Fixes #802
2020-02-28Bump version to 0.15.0michael-grunder
2020-01-28Safe allocation wrappers (#754)Michael Grunder
Create allocation wrappers with a configurable OOM handler (defaults to abort()). See #752, #747
2020-01-01fix spelling mistakesShooterIT
2019-09-01Use a const funcs in redisContext.Yossi Gottlieb
2019-08-29wip: SSL code reorganization, see #705.Yossi Gottlieb
2019-08-27Merge pull request #697 from yossigo/resp3Mark Nunberg
Port RESP3 support from Redis.
2019-08-09MinGW fix: Use _MSC_VER instead of _WIN32 where appropriateMarcus Geelnard
Use _MSC_VER (instead of _WIN32) for things that are specific for Visual Studio. Also remove #include <winsock2.h> from hiredis.h, as it leaks too many symbols and defines into the global namespace, which is undesirable for a public interface header. Anyone who uses the the affected parts of the hiredis API needs to include the appropriate headers anyway in order to declare struct timeval variables.
2019-08-04RESP3 support changes from Redis.Yossi Gottlieb
This corresponds to commits d5c54f0b..bea09a7f in the redis repository.
2019-04-13Fix Compile Error On Windows (Visual Studio)jinjiazhang
2019-04-01Port network layer to Winsockm
With this change, Hiredis builds with MinGW and runs on Windows.
2019-04-01Introduce a redisFD typem
The redisFD type should be equal to the system native socket file desciptor type (for POSIX, this is a plain int). We also introduce the REDIS_INVALID_FD value, which maps to -1 on POSIX systems.
2019-02-21Allow option for async connections to not automatically freeMark Nunberg
2019-02-20Support SNIvalentino
2019-02-20Fix bug in options macroMark Nunberg
2019-02-20Provide option-struct initializationMark Nunberg
This reduces the boilerplate of all the redisConnectXXX functions, and allows us to provide more connection options in the future.
2019-02-20Initial SSL (sync) implementationMark Nunberg
2018-09-25Call connect(2) again for non-blocking connectMark Nunberg
This retrieves the actual error which occurred, as getsockopt is not always reliable in this regard.
2018-09-25Prepare for the 0.14.0 releaseTom Lee
SONAME bumped to 0.14 because we've broken ABI compatibility with 0.13.x