memcache/connection.h
changeset 49 10c7dce1a043
parent 43 e5b714190dee
--- a/memcache/connection.h	Fri Aug 29 23:31:17 2008 +0300
+++ b/memcache/connection.h	Sat Aug 30 19:13:15 2008 +0300
@@ -8,6 +8,7 @@
 #include <event2/bufferevent.h>
 
 #include "server.h"
+#include "request.h"
 #include "command.h"
 
 struct memcache_conn {
@@ -31,8 +32,14 @@
     // have we succesfully connected yet?
     int is_connected;
     
-    // the request (if any) that we are currently processing - NULL for idle connections
-    struct memcache_req *req;
+    /*
+     * The list of requests that we are currently processing, and a pointer to the request that is currently being
+     * sent.
+     *  
+     * New requests are enqueued on the end of this list.
+     */
+    struct memcache_reqqueue_head req_queue;
+    struct memcache_req *send_req;
 
     // used to track our commands
     struct memcache_cmd cmd;