From 035f1d1e2f1810630bf5cf866136c1785f0f3dde Mon Sep 17 00:00:00 2001 From: me_desk Date: Sun, 23 Sep 2012 19:02:11 +0000 Subject: dynamic buffer allocation for client struct git-svn-id: svn://localhost/project_picapica/trunk@206 fb96df88-216d-11de-830c-f3023f12d8ac --- PICA_node.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'PICA_node.h') diff --git a/PICA_node.h b/PICA_node.h index 90521ec..c387dc1 100755 --- a/PICA_node.h +++ b/PICA_node.h @@ -66,8 +66,8 @@ #define PICA_NETWORKNAME "TESTNET" // TEMP //CONF #define NEWCONN_BUFSIZE 10 -#define CL_RBUFSIZE 32 -#define CL_WBUFSIZE 128 +//#define CL_RBUFSIZE 32 +//#define CL_WBUFSIZE 128 #define DEFAULT_BUF_SIZE 4096 @@ -82,8 +82,10 @@ struct client *right; SOCKET sck_comm; struct sockaddr_in addr; SSL *ssl_comm; -unsigned char r_buf[CL_RBUFSIZE]; -unsigned char w_buf[CL_WBUFSIZE]; +unsigned char *r_buf; +unsigned char *w_buf; +unsigned int buflen_r; +unsigned int buflen_w; unsigned int r_pos; unsigned int w_pos; -- cgit v1.2.1