Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Support item size larger than 1024*1200 bytes #36

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/Client.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion python/umemcache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down