[cl-xmpp-devel] All calls return connection object

Erik Enge erik.enge at gmail.com
Thu Nov 10 20:56:53 UTC 2005


On 11/10/05, Adam Thorsen <adam.thorsen at gmail.com> wrote:
> All subsequent calls to the API seem only to return the connection
> object, and accomplish nothing:

This is the intended behavior.  I would like to print the actual XML
sent to the server but presently CXML doesn't allow me to do that
easily without writing my own binary stream which converts to
characters and prints to a secondary character stream (eg
*standard-output*) like broadcast streams do.  I would welcome such a
patch.

I didn't see a call to xmpp:auth, was that just a slip or are you not
calling it?

According to the RFCs, if you are interested in presence information,
the recommended order is auth -> presence -> any messaging.

Also, I don't see a call to xmpp:begin-xml-stream.  This is required
as the first thing you do after xmpp:connect.  A good client should
also call xmpp:end-xml-stream before calling close on the connection
object.

> None of the above actually seem to work (the account's buddy icon
> doesn't appear to come online, and no messages are recieved from it.)

To receive replies from the server, try xmpp:receive-stanza-loop and
see what it returns to you.

* (defparameter *connection* (xmpp:connect :hostname "jabber.loglibrary.com"))
*CONNECTION*
* (xmpp:begin-xml-stream *connection*)
"<stream:stream to='jabber.loglibrary.com'
xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'
version='1.0'>"
* (xmpp:receive-stanza-loop *connection*)
Received: #<XML-ELEMENT STREAM:STREAM (4:0:0) {A9AF861}>
Received: #<XML-ELEMENT STREAM:FEATURES (0:2:0) {B3AA159}>

You can define xmpp:handle to get these replies programmatically, as
shown in the README.

Try these suggestions and let me know if you still can't get it to work.

Thanks,
Erik.



More information about the cl-xmpp-devel mailing list