From 1fac0eb99869f4885866f9f5555f545b77c490b0 Mon Sep 17 00:00:00 2001 From: Sergey Ionov Date: Tue, 8 Dec 2015 20:20:13 -0800 Subject: [PATCH 1/3] Update Client.h --- lib/Client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Client.h b/lib/Client.h index ad6a40a..563517b 100644 --- a/lib/Client.h +++ b/lib/Client.h @@ -59,7 +59,7 @@ class Client public: - Client (SOCKETDESC *sockdesc); + Client (SOCKETDESC *sockdesc, size_t maxSize); ~Client (void); bool connect(const char *address, int port); bool isConnected(void); From e0832f651d491e8ed42387a30bc2b1ec011495dc Mon Sep 17 00:00:00 2001 From: Sergey Ionov Date: Tue, 8 Dec 2015 20:21:57 -0800 Subject: [PATCH 2/3] Update umemcache.cpp --- python/umemcache.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/umemcache.cpp b/python/umemcache.cpp index 143b7cc..9dc8017 100644 --- a/python/umemcache.cpp +++ b/python/umemcache.cpp @@ -285,7 +285,7 @@ int Client_init(PyClient *self, PyObject *args, PyObject *kwargs) self->desc.recv = API_recv; self->desc.send = API_send; PRINTMARK(); - self->client = new Client(&self->desc); + self->client = new Client(&self->desc, self->maxSize); PRINTMARK(); return 0; From ce56af6cd375ceaf4c10ecd7c938985ecfd43140 Mon Sep 17 00:00:00 2001 From: Sergey Ionov Date: Tue, 8 Dec 2015 20:22:32 -0800 Subject: [PATCH 3/3] Update Client.cpp --- lib/Client.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Client.cpp b/lib/Client.cpp index ac63369..8684ae0 100644 --- a/lib/Client.cpp +++ b/lib/Client.cpp @@ -38,9 +38,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. //#define PRINTMARK() fprintf(stderr, "%s: MARK(%d)\n", __FILE__, __LINE__) #define PRINTMARK() -Client::Client (SOCKETDESC *sockdesc) - : m_writer (1024 * 1200) - , m_reader (1024 * 1200) +Client::Client (SOCKETDESC *sockdesc, size_t maxSize) + : m_writer (maxSize) + , m_reader (maxSize) { m_sock = sockdesc; }