2 #include "../acl_cpp_define.hpp" 4 #include "../connpool/connect_client.hpp" 5 #include "../stdlib/string.hpp" 6 #include "../mime/rfc2047.hpp" 8 #ifndef ACL_CLIENT_ONLY 29 memcache(
const char* addr =
"127.0.0.1:11211",
int conn_timeout = 30,
41 memcache& set_prefix(
const char* keypre);
68 bool set(
const char* key,
size_t klen,
69 const void* dat,
size_t dlen,
70 time_t timeout = 0,
unsigned short flags = 0);
81 bool set(
const char* key,
const void* dat,
size_t dlen,
82 time_t timeout = 0,
unsigned short flags = 0);
93 bool set(
const char* key,
size_t klen, time_t timeout = 0);
103 bool set(
const char* key, time_t timeout = 0);
113 bool set_begin(
const char* key,
size_t dlen,
114 time_t timeout = 0,
unsigned short flags = 0);
124 bool set_data(
const void* data,
size_t len);
135 bool get(
const char* key,
size_t klen,
string& buf,
136 unsigned short* flags = NULL);
146 bool get(
const char* key,
string& buf,
unsigned short* flags = NULL);
158 int get_begin(
const void* key,
size_t klen,
unsigned short* flags = NULL);
169 int get_begin(
const char* key,
unsigned short* flags = NULL);
180 int get_data(
void* buf,
size_t size);
188 bool del(
const char* key,
size_t klen);
195 bool del(
const char* key);
226 void property_list();
229 bool set(
const string& key,
const void* dat,
size_t dlen,
230 time_t timeout,
unsigned short flags);
231 bool get(
const string& key,
string& buf,
unsigned short* flags);
232 const string& build_key(
const char* key,
size_t klen);
245 size_t content_length_;
251 bool error_happen(
const char* line);
256 #endif // ACL_CLIENT_ONLY
ACL_CPP_API int last_error(void)
ACL_CPP_API const char * last_serror(void)