[Expat-discuss] Using XML_GetBuffer/XML_ParseBuffer

James Whetstone jameswhetstone at comcast.net
Sat Sep 23 22:04:17 CEST 2006


Another question along the same lines is whether or not I even need to worry 
about overwriting left over data in the XML Buffer.  I assumed there would 
sometimes be some left over data of a XML fragment in the buffer, but maybe 
that isn't the case.

JW

----- Original Message ----- 
From: "James Whetstone" <jameswhetstone at comcast.net>
To: <expat-discuss at libexpat.org>
Sent: Saturday, September 23, 2006 12:49 PM
Subject: [Expat-discuss] Using XML_GetBuffer/XML_ParseBuffer


> Hi,
>
> I'm looking at integrating expat into my TCP server and I'd like to use
> avoid the extra copy by utilizing XML_GetBuffer and XML_ParseBuffer.  So
> I'll use the buffer returned from XML_GetBuffer as my TCP/IP receive 
> buffer,
> passing the buffer to XML_ParseBuffer when some data is received.  So as 
> the
> XML stream is received and processed, I'll need to know how much of the 
> XML
> buffer is unused and where the unused index begins so that I can receiev
> data into the buffer without overwriting XML bytes left over from the 
> prior
> TCP read.  So...are there any functions in the expat API that were 
> intended
> to support this kind of design?
>
> Thanks,
> ---James
>
> _______________________________________________
> Expat-discuss mailing list
> Expat-discuss at libexpat.org
> http://mail.libexpat.org/mailman/listinfo/expat-discuss 



More information about the Expat-discuss mailing list