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; } 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); 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;