my.patch 1.31 KB
--- ../../xmlrpc/include/client.h	2010-08-12 20:15:42.000000000 +0200
+++ ./include/virtualitemreceiver/client.h	2010-09-13 20:51:51.284184703 +0200
@@ -3,31 +3,26 @@
 
 #include <stdio.h> /* for FILE */
 
-#include <expat.h>
+#include <expat.h>
+#include "httpRequest.h"
+
+#define READBUFSIZE    2048   /* Size of receive buffer */
+#define CLIENTMULTMAX  512U   /* 1MB maximum size the readbuffer may grow */
 
-#include "httpRequest.h"
+#define WRITE_ERR_IO        -1
+#define WRITE_ERR_NOPRINT   -2
 
-#define READBUFSIZE    2048  /* Size of receive readBuffer */
-
-extern int verbose;
+#define READ_ERR_LONGLINE   -2
 
 typedef struct {
     int          socket;
-    char *       readBuffer;
-    char *       writeBuffer;
+    char *       readBuffer;
+    char *       writeBuffer;
     unsigned int readPos;
-    unsigned int writePos;
+    unsigned int writePos;
+    unsigned int readBufMult;
+    unsigned int writeBufMult;
     char         remoteAddr[16];

     tHttpHeader  httpHeader;
     unsigned int bodyLenRemaining;

     XML_Parser   parser;
 } tClient;
 
 
-void clientClose(tClient * client);
-int clientRead(tClient * client);
-int clientWrite(tClient * client);
+void clientClose(tClient *);
+int  clientRead(tClient *);
+int  writeRemaining(tClient *);
+int  writeBuffer(tClient *);
 
 #endif // __CLIENT_H__