On 10 June 2018 at 06:09, Daniel Corbe <[email protected]> wrote: > Because it would seem to me as if one would need to read the entire stream > one byte at a time and wait for valid input before passing the message off > to a parser. IE, I’m looking for that final closing > before I can reply. > > Eeeek.
> Is there a better way to go about it that isn’t going to incur a massive > performance penalty? > Yes, there's two. Either: a) Use a SAXish parser and count events. b) Use an XML parser that allows you to extract the right XML "bits" - more or less, an element open and individual elements. For example, my fork of rapidxml offers this. It's probably the parser doing (a) internally in most cases, though. If its any consolation, the implicit framing in XMPP is generally regarded as something less than ideal that we're stuck with - but on the other hand it's a thoroughly solved problem now. Dave.
_______________________________________________ Standards mailing list Info: https://mail.jabber.org/mailman/listinfo/standards Unsubscribe: [email protected] _______________________________________________
