diff options
author | Michael Grunder <michael.grunder@gmail.com> | 2022-08-26 10:35:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-26 10:35:38 -0700 |
commit | e0200b797bb9ea1cdb744f371c3de09f72558343 (patch) | |
tree | 04fd2496251b711109b73046270f1231a61eb662 /README.md | |
parent | e7afd998f9ce3e6dfaa5e6534f779cab6a1c5a7b (diff) | |
parent | 6a3e96ad2149584e441b0e8a5827dc6c2624035b (diff) |
Merge pull request #1087 from redis/const-and-non-const-callback
Maintain backward compatibiliy withour onConnect callback.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -372,6 +372,8 @@ the disconnect callback is a good point to do so. Setting the connect or disconnect callbacks can only be done once per context. For subsequent calls the api will return `REDIS_ERR`. The function to set the callbacks have the following prototype: ```c +/* Alternatively you can use redisAsyncSetConnectCallbackNC which will be passed a non-const + redisAsyncContext* on invocation (e.g. allowing writes to the privdata member). */ int redisAsyncSetConnectCallback(redisAsyncContext *ac, redisConnectCallback *fn); int redisAsyncSetDisconnectCallback(redisAsyncContext *ac, redisDisconnectCallback *fn); ``` |