Avoid unnecessary copies by recv()ing data directly into the expat buffer

This commit is contained in:
Florent Le Coz
2014-02-28 01:14:38 +01:00
parent df774d45a9
commit 86d4347af8
8 changed files with 93 additions and 18 deletions
+9 -1
View File
@@ -37,7 +37,15 @@ public:
/**
* Feed the parser with some XML data
*/
void feed(const char* data, const int len, const bool is_final);
int feed(const char* data, const int len, const bool is_final);
/**
* Parse the data placed in the parser buffer
*/
int parse(const int size, const bool is_final);
/**
* Get a buffer provided by the xml parser.
*/
void* get_buffer(const size_t size) const;
/**
* Add one callback for the various events that this parser can spawn.
*/