Changeset 752
- Timestamp:
- 03/17/08 07:40:41 (21 months ago)
- Location:
- branches/binary/server
- Files:
-
- 2 modified
-
memcached.c (modified) (3 diffs)
-
memcached.h (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/binary/server/memcached.c
r746 r752 66 66 static void drive_machine(conn *c); 67 67 static int new_socket(struct addrinfo *ai); 68 static int server_socket(const int port, const intprot);68 static int server_socket(const int port, enum protocol prot); 69 69 static int try_read_command(conn *c); 70 70 static int try_read_network(conn *c); … … 315 315 316 316 conn *conn_new(const int sfd, const int init_state, const int event_flags, 317 const int read_buffer_size, const intprot,317 const int read_buffer_size, enum protocol prot, 318 318 struct event_base *base) { 319 319 conn *c = conn_from_freelist(); … … 3043 3043 } 3044 3044 3045 static int server_socket(const int port, const intprot) {3045 static int server_socket(const int port, enum protocol prot) { 3046 3046 int sfd; 3047 3047 struct linger ling = {0, 0}; -
branches/binary/server/memcached.h
r745 r752 198 198 }; 199 199 200 enum protocol s{200 enum protocol { 201 201 ascii_prot = 3, /* arbitrary value. */ 202 202 ascii_udp_prot, … … 273 273 int suffixleft; 274 274 275 intprotocol; /* which protocol this connection speaks */275 enum protocol protocol; /* which protocol this connection speaks */ 276 276 277 277 /* data for UDP clients */ … … 315 315 char *do_add_delta(item *item, const bool incr, const int64_t delta, char *buf); 316 316 int do_store_item(item *item, int comm); 317 conn *conn_new(const int sfd, const int init_state, const int event_flags, const int read_buffer_size, const intprot, struct event_base *base);317 conn *conn_new(const int sfd, const int init_state, const int event_flags, const int read_buffer_size, enum protocol prot, struct event_base *base); 318 318 319 319 … … 341 341 void thread_init(int nthreads, struct event_base *main_base); 342 342 int dispatch_event_add(int thread, conn *c); 343 void dispatch_conn_new(int sfd, int init_state, int event_flags, int read_buffer_size, intprot);343 void dispatch_conn_new(int sfd, int init_state, int event_flags, int read_buffer_size, enum protocol prot); 344 344 345 345 /* Lock wrappers for cache functions that are called from main loop. */
