[Standards] Network IO best practices
andrey.gursky at e-mail.ua
Mon Jun 11 10:02:23 UTC 2018
On 2018-06-10 07:09, Daniel Corbe wrote:
> First time implementor of anything XMPP-related, much less outside of
> the use of a library for dealing with XMPP.
> The chosen language here is Go and the few XMPP libraries that exist
> in our world are hilariously incomplete. So I’m stuck implementing a
> library for my application from scratch.
FYI there is a new XMPP server, which is being written in Go:
> So here goes my question.
> I’m watching my XMPP client talk to a server, and there doesn’t seem
> to be any delineation between stanzas. It’s just a byte stream of
> XML. No CR, CRLF or LF to indicate that one side of the conversation
> is finished sending messages.
> How do people typically deal with this in other languages?
> 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.
> Is there a better way to go about it that isn’t going to incur a
> massive performance penalty?
More information about the Standards