Merge memslap
[awesomized/libmemcached] / clients / ms_conn.h
index efdd4aa9a00d4850d06aad067018a3767d24b803..a52a55c95ec62a6f3685e0a394ac092de27be49d 100644 (file)
@@ -17,7 +17,7 @@
 #include <netdb.h>
 
 #include "ms_task.h"
-#include "protocol_binary.h"
+#include <libmemcached/memcached/protocol_binary.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -30,8 +30,7 @@ extern "C" {
 #define UDP_MAX_SEND_PAYLOAD_SIZE    1400                 /* mtu size is 1500 */
 #define UDP_HEADER_SIZE              8                    /* UDP header size */
 #define MAX_SENDBUF_SIZE             (256 * 1024 * 1024)  /* Maximum socket buffer size */
-#define SOCK_WAIT_TIMEOUT            10                   /* maximum waiting time of UDP, 10s */
-#define EVENT_TIMEOUT                10                   /* maximum waiting time of event,10s */
+#define SOCK_WAIT_TIMEOUT            30                   /* maximum waiting time of UDP, 30s */
 #define MAX_UDP_PACKET               (1 << 16)            /* maximum UDP packets, 65536 */
 
 /* Initial size of the sendmsg() scatter/gather array. */
@@ -104,7 +103,6 @@ typedef struct udppkt
 enum protocol
 {
   ascii_prot = 3,           /* ASCII protocol */
-  ascii_udp_prot,           /* ASCII UDP protocol*/
   binary_prot,              /* binary protocol */
 };
 
@@ -162,7 +160,7 @@ typedef struct conn
 
   /* data for UDP clients */
   int udp;                          /* is this is a UDP "connection" */
-  int request_id;                   /* UDP request ID of current operation, if this is a UDP "connection" */
+  uint32_t request_id;                   /* UDP request ID of current operation, if this is a UDP "connection" */
   uint8_t *hdrbuf;                  /* udp packet headers */
   int hdrsize;                      /* number of headers' worth of space is allocated */
   struct  sockaddr srv_recv_addr;   /* Sent the most recent request to which server */
@@ -229,7 +227,7 @@ int ms_mcd_set(ms_conn_t *c, ms_task_item_t *item);
 
 
 /* used to send the get command to server */
-int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item, bool verify);
+int ms_mcd_get(ms_conn_t *c, ms_task_item_t *item);
 
 
 /* used to send the multi-get command to server */