X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fconstants.h;h=b12a3890ff62a6cafcf7e4a57d158ef1863d0084;hb=a6b4334cc16705c72da526a516f396a162cd8bfb;hp=980a32bfec1657ce153b3215214a670cea89bce3;hpb=965bde2b42f5ef2dd7b55b6b4b74822e7cfaa1de;p=awesomized%2Flibmemcached diff --git a/libmemcached/constants.h b/libmemcached/constants.h index 980a32bf..b12a3890 100644 --- a/libmemcached/constants.h +++ b/libmemcached/constants.h @@ -1,5 +1,5 @@ /* LibMemcached - * Copyright (C) 2006-2009 Brian Aker + * Copyright (C) 2006-2009 Brian Aker * All rights reserved. * * Use and distribution licensed under the BSD license. See @@ -9,23 +9,25 @@ * */ -#ifndef __MEMCACHED_CONSTANTS_H__ -#define __MEMCACHED_CONSTANTS_H__ +#ifndef __LIBMEMCACHED_CONSTANTS_H__ +#define __LIBMEMCACHED_CONSTANTS_H__ /* Public defines */ #define MEMCACHED_DEFAULT_PORT 11211 #define MEMCACHED_MAX_KEY 251 /* We add one to have it null terminated */ #define MEMCACHED_MAX_BUFFER 8196 -#define MEMCACHED_MAX_HOST_LENGTH 64 #define MEMCACHED_MAX_HOST_SORT_LENGTH 86 /* Used for Ketama */ #define MEMCACHED_POINTS_PER_SERVER 100 #define MEMCACHED_POINTS_PER_SERVER_KETAMA 160 #define MEMCACHED_CONTINUUM_SIZE MEMCACHED_POINTS_PER_SERVER*100 /* This would then set max hosts to 100 */ #define MEMCACHED_STRIDE 4 -#define MEMCACHED_DEFAULT_TIMEOUT 1000 +#define MEMCACHED_DEFAULT_TIMEOUT 5000 +#define MEMCACHED_DEFAULT_CONNECT_TIMEOUT 4000 #define MEMCACHED_CONTINUUM_ADDITION 10 /* How many extra slots we should build for in the continuum */ #define MEMCACHED_PREFIX_KEY_MAX_SIZE 128 #define MEMCACHED_EXPIRATION_NOT_ADD 0xffffffffU +#define MEMCACHED_VERSION_STRING_LENGTH 24 + typedef enum { MEMCACHED_SUCCESS, @@ -67,6 +69,10 @@ typedef enum { MEMCACHED_UNKNOWN_STAT_KEY, MEMCACHED_E2BIG, MEMCACHED_INVALID_ARGUMENTS, + MEMCACHED_KEY_TOO_BIG, + MEMCACHED_AUTH_PROBLEM, + MEMCACHED_AUTH_FAILURE, + MEMCACHED_AUTH_CONTINUE, MEMCACHED_MAXIMUM_RETURN /* Always add new error code before */ } memcached_return_t; @@ -112,6 +118,9 @@ typedef enum { MEMCACHED_BEHAVIOR_AUTO_EJECT_HOSTS, MEMCACHED_BEHAVIOR_NUMBER_OF_REPLICAS, MEMCACHED_BEHAVIOR_RANDOMIZE_REPLICA_READ, + MEMCACHED_BEHAVIOR_CORK, + MEMCACHED_BEHAVIOR_TCP_KEEPALIVE, + MEMCACHED_BEHAVIOR_TCP_KEEPIDLE, MEMCACHED_BEHAVIOR_MAX } memcached_behavior_t; @@ -141,6 +150,7 @@ typedef enum { MEMCACHED_HASH_HSIEH, MEMCACHED_HASH_MURMUR, MEMCACHED_HASH_JENKINS, + MEMCACHED_HASH_CUSTOM, MEMCACHED_HASH_MAX } memcached_hash_t; @@ -152,4 +162,4 @@ typedef enum { MEMCACHED_CONNECTION_MAX } memcached_connection_t; -#endif /* __MEMCACHED_CONSTANTS_H__ */ +#endif /* __LIBMEMCACHED_CONSTANTS_H__ */