diff options
Diffstat (limited to 'async.h')
-rw-r--r-- | async.h | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -66,16 +66,18 @@ typedef struct redisAsyncContext { /* Not used by hiredis */ void *data; - /* Used by the different event lib adapters to store their private data */ - void *_adapter_data; - - /* Called when the library expects to start reading/writing. - * The supplied functions should be idempotent. */ - void (*evAddRead)(void *privdata); - void (*evDelRead)(void *privdata); - void (*evAddWrite)(void *privdata); - void (*evDelWrite)(void *privdata); - void (*evCleanup)(void *privdata); + /* Event library data and hooks */ + struct { + void *data; + + /* Hooks that are called when the library expects to start + * reading/writing. These functions should be idempotent. */ + void (*addRead)(void *privdata); + void (*delRead)(void *privdata); + void (*addWrite)(void *privdata); + void (*delWrite)(void *privdata); + void (*cleanup)(void *privdata); + } ev; /* Called when either the connection is terminated due to an error or per * user request. The status is set accordingly (REDIS_OK, REDIS_ERR). */ |