From 9ff1cc7826f6d546fc0fcdd7f08554e729a447a1 Mon Sep 17 00:00:00 2001 From: Jean Flach Date: Fri, 26 Oct 2018 15:56:27 +0200 Subject: Update README.md Add note about using context->data to pass user data to connect and disconnect callbacks --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 01223ea..b004746 100644 --- a/README.md +++ b/README.md @@ -286,6 +286,7 @@ return `REDIS_ERR`. The function to set the disconnect callback has the followin ```c int redisAsyncSetDisconnectCallback(redisAsyncContext *ac, redisDisconnectCallback *fn); ``` +`ac->data` may be used to pass user data to this callback, the same can be done for redisConnectCallback. ### Sending commands and their callbacks In an asynchronous context, commands are automatically pipelined due to the nature of an event loop. -- cgit v1.2.3