`ac->data` may be used to pass user data to both of thes callbacks. An typical implementation
`ac->data` may be used to pass user data to both callbacks. A typical implementation
might look something like this:
```c
voidappOnConnect(redisAsyncContext*c,intstatus)
...
...
@@ -444,9 +444,9 @@ For every command issued, with the exception of **SUBSCRIBE** and **PSUBSCRIBE**
called exactly once. Even if the context object id disconnected or deleted, every pending callback
will be called with a `NULL` reply.
For **SUBSCRIBE** and **PSUBSCRIBE**, the callbacks may be called repeatedly until a `unsubscribe`
For **SUBSCRIBE** and **PSUBSCRIBE**, the callbacks may be called repeatedly until an`unsubscribe`
message arrives. This will be the last invocation of the callback. In case of error, the callbacks
may reive a final `NULL` reply instead.
may receive a final `NULL` reply instead.
### Disconnecting
...
...
@@ -708,7 +708,7 @@ If you have a unique use-case where you don't want hiredis to automatically inte
redisSetPushCallback(context,NULL);
```
_Note: With no handler configured, calls to `redisCommand` may generate more than one reply, so this strategy is only applicable when there's some kind of blocking`redisGetReply()` loop (e.g. `MONITOR` or `SUBSCRIBE` workloads)._
_Note: With no handler configured, calls to `redisCommand` may generate more than one reply, so this strategy is only applicable when there's some kind of blocking`redisGetReply()` loop (e.g. `MONITOR` or `SUBSCRIBE` workloads)._