Add hiredis async adapter and pub/sub subscription

This commit is contained in:
Audric committed 2026-04-15 02:52:03 +02:00
1 parent 98b7d0a89e
commit 0de78c459b
5 files changed
+139 -8

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#ifndef REDIS_ASYNC_ADAPTER_INCLUDED
#define REDIS_ASYNC_ADAPTER_INCLUDED
struct redisAsyncContext;
class RedisAsyncAdapter
{
public:
// Attach hiredis async callbacks to the Async event loop via FdWatch.
// Returns false if the context is already attached or invalid.
// The adapter cleans itself up when hiredis invokes ev.cleanup
// (on disconnect/free).
static bool attach(redisAsyncContext* ac);
};
#endif /* REDIS_ASYNC_ADAPTER_INCLUDED */