add realloc for recvBuf and sendBuf