Created a bigger buffer for write/read.
[m6w6/libmemcached] / lib / common.h
1 /*
2 Common include file for libmemached
3 */
4
5 #ifndef __COMMON_H__
6 #define __COMMON_H__
7
8 #include <memcached.h>
9 #include <memcached_io.h>
10
11 #include <libmemcached_config.h>
12
13 #ifdef HAVE_DTRACE
14 #define _DTRACE_VERSION 1
15 #else
16 #undef _DTRACE_VERSION
17 #endif
18
19 #include "libmemcached_probes.h"
20
21 typedef enum {
22 MEM_NO_BLOCK= (1 << 0),
23 MEM_TCP_NODELAY= (1 << 1),
24 MEM_REUSE_MEMORY= (1 << 2),
25 MEM_USE_MD5= (1 << 3),
26 MEM_USE_KETAMA= (1 << 4),
27 } memcached_flags;
28
29 void md5_signature(unsigned char *key, unsigned int length, unsigned char *result);
30 memcached_return memcached_connect(memcached_st *ptr, unsigned int server_key);
31 memcached_return memcached_response(memcached_st *ptr,
32 char *buffer, size_t buffer_length,
33 unsigned int server_key);
34 unsigned int memcached_generate_hash(memcached_st *ptr, char *key, size_t key_length);
35 void memcached_quit_server(memcached_st *ptr, unsigned int server_key);
36
37 #endif /* __COMMON_H__ */