W3C home > Mailing lists > Public > www-lib@w3.org > July to September 2003

POST bytes of data and receive response from server

From: Jerry G. Chiuan <jerry@oridus.com>
Date: Wed, 6 Aug 2003 11:48:02 -0700
Message-ID: <187501c35c4b$44007890$25a8a8a8@piglet>
To: <www-lib@w3.org>
Hi All,
I try to send this email to see anyone can give me some helps for my difficulty

I would like to use libwww to POST bytes of data from my application to the server and receive response as well from there, save response as bytes of data.
my data is stored in some kind of data structure like this:

class buffer {
char a[2];
char b[1];
char *c = "Hello World";    // length is changeable
::
::
}

my problem is:

- is it possible to POST seperated bytes of data instead of using 
HTAnchor_setDocument(src, data);        // char   *data 

I mean I don't want to construct my buffer as single "consecutive bytes of data" before using setDocument( ) and set it at a time, cause it brings overhead of array copy and possible memory reallocation ( length of data pointed by "c" is dynamic, not fixed length ). 

Instead, I would like to directly dump my data to libwww, a, b, and c.....one by one, like what we can do by using JAVA's DataOutputStream.write( )

Or, you think this kind of overhead can't be avoid anyway. libwww also needs to do it if application doesn't do it and just directly dump data seperatedly as what I mention.



Regds,

- Jerry  
Received on Wednesday, 6 August 2003 14:45:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:43 GMT