summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_parser.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-02-28 01:14:38 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-02-28 01:14:38 +0100
commit86d4347af8532ef85472e47c01d645fa5ad1b3b1 (patch)
treeddc9e019b89b216bed33911a2e2aeb03c668443c /src/xmpp/xmpp_parser.hpp
parentdf774d45a9754274a1701d801e4a42e71d38c97c (diff)
downloadbiboumi-86d4347af8532ef85472e47c01d645fa5ad1b3b1.tar.gz
biboumi-86d4347af8532ef85472e47c01d645fa5ad1b3b1.tar.bz2
biboumi-86d4347af8532ef85472e47c01d645fa5ad1b3b1.tar.xz
biboumi-86d4347af8532ef85472e47c01d645fa5ad1b3b1.zip
Avoid unnecessary copies by recv()ing data directly into the expat buffer
Diffstat (limited to 'src/xmpp/xmpp_parser.hpp')
-rw-r--r--src/xmpp/xmpp_parser.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_parser.hpp b/src/xmpp/xmpp_parser.hpp
index afdfdfa..df9cda7 100644
--- a/src/xmpp/xmpp_parser.hpp
+++ b/src/xmpp/xmpp_parser.hpp
@@ -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.
*/