From mikhail.shevchuk at gmail.com Fri Apr 20 17:59:38 2007 From: mikhail.shevchuk at gmail.com (Mikhail Shevchuk) Date: Sat, 21 Apr 2007 00:59:38 +0700 Subject: [cl-xmpp-devel] Chat conference Message-ID: <7da939550704201059i12eca891ib00d92c8a3e5b87c@mail.gmail.com> I would like to use cl-xmpp to connect to a multi-user chat conference. Does it currently allow me to do so? P.S. Actually I only need to print messages to the conference. -- A vivid and creative mind characterizes you. From mikhail.shevchuk at gmail.com Sat Apr 21 18:58:39 2007 From: mikhail.shevchuk at gmail.com (Mikhail Shevchuk) Date: Sun, 22 Apr 2007 01:58:39 +0700 Subject: [cl-xmpp-devel] Stream question Message-ID: <7da939550704211158md21fdbem80e7925e7fef2322@mail.gmail.com> Hello, folks. I was playing with Allegro's :sock package trying to write a Jabber bot, but I've faced to the following problem: when I receive a message the first time, I get only '<' sign and no further XML. But after receiving the second piece of data I get the full piece of XML of the previous message and the '<' again. I suppose it is because of buffering or something, because when I hit C-c C-c (in SLIME) I get all data printed in the REPL. I am reading socket with the following code: (loop for char = (read-char *conn*) while char do (progn (format t "~:c" char) (force-output t))) And one more socket-related question. What is the most robust socket package for CL? I've tried to use usocket with sbcl, but couldn't find any documentation on how to use it, even the synopsis. -- A vivid and creative mind characterizes you. From david at lichteblau.com Sat Apr 21 19:30:51 2007 From: david at lichteblau.com (David Lichteblau) Date: Sat, 21 Apr 2007 21:30:51 +0200 Subject: [cl-xmpp-devel] Stream question In-Reply-To: <7da939550704211158md21fdbem80e7925e7fef2322@mail.gmail.com> References: <7da939550704211158md21fdbem80e7925e7fef2322@mail.gmail.com> Message-ID: <20070421193051.GA8442@ununoctium> Hi, Quoting Mikhail Shevchuk (mikhail.shevchuk at gmail.com): > I was playing with Allegro's :sock package trying to write a Jabber > bot, but I've faced to the following problem: when I receive a message > the first time, I get only '<' sign and no further XML. But after > receiving the second piece of data I get the full piece of XML of the > previous message and the '<' again. I suppose it is because of > buffering or something, because when I hit C-c C-c (in SLIME) I get > all data printed in the REPL. I am reading socket with the following > code: from what you are writing, I am not sure whether you are having issues with your own code on Allegro or with cl-xmpp. Note that cl-xmpp normally reads from the socket itself. If the trouble you are having is indeed caused by something in cl-xmpp, can you please include an example of how to reproduce the issues you are having using cl-xmpp? > And one more socket-related question. What is the most robust socket > package for CL? I've tried to use usocket with sbcl, but couldn't find > any documentation on how to use it, even the synopsis. usocket has docstrings, available through the DOCUMENTATION function. I would suggest contacting its author or the usocket mailing list directly if you find its documentation insufficient. d. From erik.enge at gmail.com Sat Apr 21 19:44:16 2007 From: erik.enge at gmail.com (Erik Enge) Date: Sat, 21 Apr 2007 15:44:16 -0400 Subject: [cl-xmpp-devel] Chat conference In-Reply-To: <7da939550704201059i12eca891ib00d92c8a3e5b87c@mail.gmail.com> References: <7da939550704201059i12eca891ib00d92c8a3e5b87c@mail.gmail.com> Message-ID: <58f839b70704211244m5347c286u5d1ddd154909ef8@mail.gmail.com> I don't recall implementing that so unless someone has added support for it, probably not. If it's a reasonable stable JEP there's no reason it couldn't be included though. Thanks, Erik. On 4/20/07, Mikhail Shevchuk wrote: > I would like to use cl-xmpp to connect to a multi-user chat > conference. Does it currently allow me to do so? > > P.S. Actually I only need to print messages to the conference. > > -- > A vivid and creative mind characterizes you. > _______________________________________________ > cl-xmpp-devel mailing list > cl-xmpp-devel at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-xmpp-devel > From mikhail.shevchuk at gmail.com Sat Apr 21 20:17:05 2007 From: mikhail.shevchuk at gmail.com (Mikhail Shevchuk) Date: Sun, 22 Apr 2007 03:17:05 +0700 Subject: [cl-xmpp-devel] Stream question In-Reply-To: <20070421193051.GA8442@ununoctium> References: <7da939550704211158md21fdbem80e7925e7fef2322@mail.gmail.com> <20070421193051.GA8442@ununoctium> Message-ID: <7da939550704211317o414ddc85wd84cb79296d3945a@mail.gmail.com> Thank you for fast reply, David. 2007/4/22, David Lichteblau : > from what you are writing, I am not sure whether you are having issues > with your own code on Allegro or with cl-xmpp. I don't use cl-xmpp because it doesn't work with local ejabberd. When I try to perform the auth command, I get the feature-not-implemented error. So, I am trying to use raw sockets to send XML. ;; Connecting to remote server (defvar *conn* (socket:make-socket :remote-host "jabber.tom.ru" :remote-port 5222)) Then, after authentication and sending a 'presence' command, there is an infinite loop, reading the socket: (loop for char = (read-char *conn*) while char do (progn (format t "~:c" char) (force-output t))) Which behavior seems odd to me (as described earlier). -- A vivid and creative mind characterizes you. From david at lichteblau.com Sat Apr 21 20:24:38 2007 From: david at lichteblau.com (David Lichteblau) Date: Sat, 21 Apr 2007 22:24:38 +0200 Subject: [cl-xmpp-devel] Stream question In-Reply-To: <7da939550704211317o414ddc85wd84cb79296d3945a@mail.gmail.com> References: <7da939550704211158md21fdbem80e7925e7fef2322@mail.gmail.com> <20070421193051.GA8442@ununoctium> <7da939550704211317o414ddc85wd84cb79296d3945a@mail.gmail.com> Message-ID: <20070421202438.GB8442@ununoctium> Quoting Mikhail Shevchuk (mikhail.shevchuk at gmail.com): > I don't use cl-xmpp because it doesn't work with local ejabberd. When > I try to perform the auth command, I get the feature-not-implemented > error. So, I am trying to use raw sockets to send XML. I would suggest extending or fixing cl-xmpp as appropriate instead of re-inventing the XML parsing and serialization logic already implemented by cl-xmpp and cxml. And while this list cannot replace Allegro's support, let me mention the only obvious reason I can imagine for a socket read to block unexpectedly, which would be that you forgot to actually send (force output of) the request you're reading the reply for. d. From mikhail.shevchuk at gmail.com Sat Apr 21 20:40:57 2007 From: mikhail.shevchuk at gmail.com (Mikhail Shevchuk) Date: Sun, 22 Apr 2007 03:40:57 +0700 Subject: [cl-xmpp-devel] feature-not-implemented issue Message-ID: <7da939550704211340o1b9355a0i7162430bbb364050@mail.gmail.com> Hi, I have a problem with the xmpp:auth command - it doesn't authenticate my client. After evaluating the '(xmpp:auth *connection* "test" "test" "sbcl"), I get the following result: testtestsbcl> "" But client was not appeared in a roaster. May be that will be useful - I tried to connect and authenticate using simple sockets and that works well with the following auth command: test test sbcl -- A vivid and creative mind characterizes you. From mikhail.shevchuk at gmail.com Mon Apr 23 05:37:34 2007 From: mikhail.shevchuk at gmail.com (Mikhail Shevchuk) Date: Mon, 23 Apr 2007 12:37:34 +0700 Subject: [cl-xmpp-devel] Sample Usage section Message-ID: <7da939550704222237x1f688419gd1dd6dbc3d68dfcd@mail.gmail.com> Hello, There is a little drawback on cl-xmpp project page in the Sample Usage Section: * (xmpp:auth connection "password" "resource") There is one more argument - "username" before the "password" -- A vivid and creative mind characterizes you. From stephan at spaceboyz.net Sun Apr 29 14:44:30 2007 From: stephan at spaceboyz.net (Stephan Maka) Date: Sun, 29 Apr 2007 16:44:30 +0200 Subject: [cl-xmpp-devel] Support for XEP-0114 (Component Protocol) Message-ID: <20070429144430.GA22688@chronos> Hello I'm missing component support in cl-xmpp, the attached chunk adds it. Unfortunately, I'm still a very beginner with Lisp, so this can't be taken as a serious implementation. The code is mostly copied from client and it doesn't test the handshake response for failure. In XMPP4R[0] we have a stream class for sending and receiving stanzas. It is superclass to connection, where we handle TCP setup and sending/receiving data. Derived from connection are client and component which do stuff like specifying attributes. I don't know what the right way for a Lisp library would be, but a component has slightly different conventions than a client, i.e. it shouldn't send a plain after auth, or any stanza-constructing method must posses a way for specifying the from attribute. Stephan [0] http://home.gna.org/xmpp4r/ -------------- next part -------------- (require 'cl-xmpp) (in-package :xmpp) (defclass component (connection) ()) (defun connect-component (&key (hostname *default-hostname*) (port 5347) (receive-stanzas t) (begin-xml-stream t) jid-domain-part (class 'component)) (let* ((stream (trivial-sockets:open-stream hostname port :element-type '(unsigned-byte 8))) (connection (make-instance class :jid-domain-part jid-domain-part :server-stream stream :hostname hostname :port port))) (when begin-xml-stream (begin-xml-stream connection)) (when receive-stanzas (receive-stanza connection)) ; stream connection)) (defmethod begin-xml-stream ((connection component) &key (xml-identifier t)) "Begin XML stream. This should be the first thing to happen on a newly connected connection." (with-xml-stream (stream connection) (when xml-identifier (xml-output stream "")) (xml-output stream (fmt "" (or (jid-domain-part connection) (hostname connection)))))) (defmethod auth-component ((connection component) password) (with-xml-output (connection) (if (stream-id connection) (cxml:with-element "handshake" (cxml:text (make-digest-password (stream-id connection) password))) (error "stream-id on ~a not set, cannot make digest password" connection))) (receive-stanza connection)) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available URL: