-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathSMASyncRedis.h
More file actions
43 lines (33 loc) · 820 Bytes
/
SMASyncRedis.h
File metadata and controls
43 lines (33 loc) · 820 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
extern "C" {
#ifdef _WIN32
#define WIN32_INTEROP_APIS_H
#define NO_QFORKIMPL
#include <Win32_Interop/win32fixes.h>
#pragma comment(lib,"hiredis.lib")
#pragma comment(lib,"Win32_Interop.lib")
#endif
}
#include "client.h"
#include "smsdk_ext.h"
#include "concurrentqueue.h"
#include <vector>
#include <functional>
struct redisReply;
struct CBData
{
Handle_t handle;
int status;
IPluginFunction *callback;
IdentityToken_t *identity;
redisReply *reply;
cell_t data;
};
class SMASyncRedis :public async_redis::client
{
public:
SMASyncRedis(size_t piped_cache = 0, uint32_t pipeline_timeout = 0)
: async_redis::client(piped_cache, pipeline_timeout) {}
Handle_t handle;
void CmdCallback(void *r, void *privdata);
};