summaryrefslogtreecommitdiff
path: root/examples
AgeCommit message (Collapse)Author
2024-03-22fixup! all: rename output filesAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-03-22all: rename output filesAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2024-03-22all: use REUSE with LGPL-3.0-or-later and BSD-3-ClauseAnna (navi) Figueiredo Gomes
Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
2023-04-24Add RedisModule adapter (#1182)Ozan Tezcan
* Add RedisModule adapter * add timer callback, add compatibility helper
2023-03-07Cmake static or shared (#1160)autoantwort
* cmake: build either static or shared libs * cmake: allow to build non-PIC static libs * fix typo * cmake: add ALIAS targets * cmake: link to OpenSSL imported targets CMake imported targets are more robust * turn ENABLE_EXAMPLES to a CMake option * fix typo * install pdb files if shared * fix hiredis_ssl-config file * Fix more targets * CMake knows when to enable CMAKE_POSITION_INDEPENDENT_CODE * Restore setting of /Z7 * [ci] fix building of shared and static libs * Apply suggestions from code review Co-authored-by: Bjorn Svensson <bjorn.a.svensson@est.tech> * Make it possible to change name of exported target --------- Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> Co-authored-by: Bjorn Svensson <bjorn.a.svensson@est.tech>
2022-12-27CMakeLists.txt: respect BUILD_SHARED_LIBSFabrice Fontaine
To allow building hiredis on toolchain without dynamic library support, respect standard cmake BUILD_SHARED_LIBS: https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2022-12-21Add sdevent adapterMichael de Lang
2022-11-12Add an example that calls redisCommandArgv (#1140)Michael Grunder
See #1138
2022-09-21Add timeout support to libhv adapter. (#1109)Michael Grunder
Add timeout support to libhv adapter. See: #904
2022-09-07Add adapters/libhvhewei.it
2022-08-29Fix some undefined behaviourjengab
- redisSSLContextError must always be initialized at defintion, otherwise when SSL connect succeeds it may not be assigned to a valid error. Thus the memory trash remains in the variable, which may sign a misleading error.
2022-07-05Polling adapter and exampleKristján Valur Jónsson
2022-01-18Add timeout support for libuv adapter (#1016)MichaelSuen
Add timeout to libuv adapter Co-authored-by: sunmingqi <sunmingqi@corp.netease.com> Co-authored-by: sunmingqi <smq222@126.com> Co-authored-by: Michael Grunder <michael.grunder@gmail.com> Co-authored-by: Viktor Söderqvist <viktor@zuiderkwast.se>
2021-11-18Correct CMake warning for libevent adapter exampleBjörn Svensson
2020-08-07Don't use non-installed win32.h helper in examples (#863)Michael Grunder
See: #862
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-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-19Remove erroneous tag and add license to push example (#849)Michael Grunder
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-07-10Some Windows quality of life improvments. (#846)Michael Grunder
* Don't try to ignore SIGPIPE in Windows (it doesn't exist). * Add an include to our win32.h compatibility header. * Enable building examples on Travis in Windows. See #831
2020-05-24New SSL API to replace redisSecureConnection().Yossi Gottlieb
2019-09-01Update CMakelists for hiredis/hiredis_ssl builds.Yossi Gottlieb
Also rename the SSL option from `HIREDIS_SSL` to `ENABLE_SSL` to conform with CMake convnetions.
2019-08-29wip: SSL code reorganization, see #705.Yossi Gottlieb
2019-04-10build ssl example if ssl is enabledMark Nunberg
2019-02-20Support SNIvalentino
2019-02-20libevent-example: Use timeoutMark Nunberg
2019-02-20SSL for async I/OMark Nunberg
2019-02-20Add SSL exampleMark Nunberg
2019-02-20Add examples to CMakeListsMark Nunberg
2018-12-05Allow connections to unix socket in exampleMark Nunberg
To minimize code changes, a simple `u` (or UNIX, Unix, unix, etc -- as long as the first character is u or U) is used as a marker for the 'port' argument. In this case, the hostname is interpreted to be the path to the unix socket.
2015-10-05fix snprintf format stringSergey Polovko
2015-07-27Fix a typo in the Mac OSX exampleJan-Erik Rediger
2015-07-27Added MacOS X addapter and corresponding example.Dmitry Bakhvalov
Added MacOS X support via CoreFoundation run loop.
2015-07-27Make sure to disconnect the adapter in the destructorPietro Cerutti
2015-07-27Add Qt adapter and relative example.Pietro Cerutti
2015-07-27Add an Ivykis adapterGergely Nagy
This adds a new adapter and an example for using hiredis with the ivykis async I/O library. Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
2015-01-05Add GLib 2.0 adapterChristian Hergert
[Cleaned up Makefile and header includes. Didn't change crazy coding style because it's the convention for GLib systems.] Closes #83 Closes #71
2013-07-11example.c: it is now possible to specify server ip/port.antirez
This makes possible to use the example with IPv6 addresses and/or with a different Redis instance than 127.0.0.1:6379.
2013-07-10Emphasize size_t length for %b formattingWolfgang Richter
Closes #121.
2013-07-10Update example.cRafael Zanella
Added a call to redisFree() Closes #148.
2013-07-10Move examples into their own folderAaron Bedra
Closes #166.