jeremie at jabber.org
Thu Jan 21 14:53:53 CST 1999
> Would it be possible to get a more detailed explanation of the protocol
> online? I'd love to help if you need it.
Well, what's there is for the most part just the raw protocol. I've been
wanting to write up a nice step by step detail of it with explanations,
but that takes time and I'll start having more time in a few weeks.
> What are all of the available <j type='something'></j> messages that can
> be sent from the client to the server? What responses are possible for
> each message?
What you see on the protocol page on the site is it, all the things you
can send and all the responses.
> Is there always a response sent for each message?
Nope. Server only talks when it has somethig to say.
> Maybe a
> <j type='error'></j> for unrecognized types.
It works similiar to how a browser approaches HTML... the server deals
with what it can understand/decode, anything else is ignored.
To make sure on the initial connection to the port though, that you have a
Jabber server talking and what it understands/version, the client can
optionally do a little type='connection' handshake.
> What about end of lines?
Nope, <drone type='borg'>Whitespace is irrelevant</drone>
With XML, the markers/identifiers between different sets of information is
the tags, not the end of lines.
> >From my experimental tinkering with writing a Java client, it doesn't
> look like the server sends any end of lines at all. That made it a lot
> harder to collect a response and parse it. I've implemented both text
> protocols like SMTP and POP3 in Java and binary ones like DNS. As much
> more difficult as the binary based ones were to implement and debug, I
> at least knew what to expect as responses.
I'd HIGHLY reccommend checking out any of the available Java XML parsers
out there, you should be able to feed the stream of data right to them(or
with slight modification/chunking) and they will take care of all of the
nasty parts of deailing with the XML encoding... it's really slick after
you get to that point.
More information about the JDev