#define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */
#define MEMCACHED_MAX_BUFFER HUGE_STRING_LEN
#define MEMCACHED_MAX_HOST_LENGTH 64
+#define MEMCACHED_WHEEL_SIZE 1024
+#define MEMCACHED_STRIDE 4
typedef enum {
MEMCACHED_SUCCESS,
MEMCACHED_FAIL_UNIX_SOCKET,
MEMCACHED_NOT_SUPPORTED,
MEMCACHED_NO_KEY_PROVIDED,
+ MEMCACHED_FETCH_NOTFINISHED,
MEMCACHED_MAXIMUM_RETURN, /* Always add new error code before */
} memcached_return;
+typedef enum {
+ MEMCACHED_DISTRIBUTION_MODULO,
+ MEMCACHED_DISTRIBUTION_CONSISTENT,
+} memcached_server_distribution;
+
typedef enum {
MEMCACHED_BEHAVIOR_NO_BLOCK,
MEMCACHED_BEHAVIOR_TCP_NODELAY,
MEMCACHED_BEHAVIOR_CACHE_LOOKUPS,
MEMCACHED_BEHAVIOR_SUPPORT_CAS,
MEMCACHED_BEHAVIOR_POLL_TIMEOUT,
+ MEMCACHED_BEHAVIOR_DISTRIBUTION,
} memcached_behavior;
typedef enum {
size_t read_buffer_length;
char *read_ptr;
memcached_allocated sockaddr_inited;
- struct sockaddr_in servAddr;
+ struct addrinfo *address_info;
memcached_connection type;
uint8_t major_version;
uint8_t minor_version;
int32_t poll_timeout;
memcached_string_st result_buffer;
memcached_hash hash;
+ memcached_server_distribution distribution;
+ unsigned int wheel[MEMCACHED_WHEEL_SIZE];
+ uint8_t replicas;
memcached_return warning; /* Future Use */
};
#define WATCHPOINT_ERROR(A) fprintf(stderr, "\nWATCHPOINT %s:%d %s\n", __FILE__, __LINE__, memcached_strerror(NULL, A));fflush(stdout);
#endif
#define WATCHPOINT_STRING(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__,A);fflush(stdout);
+#define WATCHPOINT_STRING_LENGTH(A,B) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %.*s\n", __FILE__, __LINE__,__func__,(int)B,A);fflush(stdout);
#define WATCHPOINT_NUMBER(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %zu\n", __FILE__, __LINE__,__func__,(size_t)(A));fflush(stdout);
#define WATCHPOINT_ERRNO(A) fprintf(stderr, "\nWATCHPOINT %s:%d (%s) %s\n", __FILE__, __LINE__,__func__, strerror(A));A= 0;fflush(stdout);
#define WATCHPOINT_ASSERT(A) assert((A));
#define WATCHPOINT { 1; };
#define WATCHPOINT_ERROR(A) { 1; };
#define WATCHPOINT_STRING(A) { 1; };
+#define WATCHPOINT_STRING_LENGTH(A,B) { 1; };
#define WATCHPOINT_NUMBER(A) { 1; };
#define WATCHPOINT_ERRNO(A) { 1; };
#define WATCHPOINT_ASSERT(A) { 1; };