forked from cheekyguy/memcached
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbinary_sm.h
36 lines (26 loc) · 803 Bytes
/
binary_sm.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
/* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
#if !defined(_binary_sm_h_)
#define _binary_sm_h_
/**
* define types that don't rely on other modules.
*/
typedef struct bp_cmd_info_s bp_cmd_info_t;
typedef struct bp_hdr_pool_s bp_hdr_pool_t;
struct bp_cmd_info_s {
size_t header_size;
char has_key;
char has_value;
char has_string;
};
struct bp_hdr_pool_s {
char* ptr;
size_t bytes_free;
bp_hdr_pool_t* next;
};
#include "memcached.h"
extern void process_binary_protocol(conn* c);
extern bp_hdr_pool_t* bp_allocate_hdr_pool(bp_hdr_pool_t* next);
extern void bp_write_err_msg(conn* c, const char* str);
extern void bp_shrink_hdr_pool(conn* c);
extern void bp_release_hdr_pool(conn* c);
#endif /* #if !defined(_binary_sm_h_) */