xmpp plugin back in svn

4 views
Skip to first unread message

Steve Ivy

unread,
Jan 26, 2008, 11:21:11 PM1/26/08
to diso-project
Hi guys (waves at danbri)

The xmpp plugin is back (and updated!) in the repo, under
wordpress/wp-xmpp/branches/experimental/.

The plugin provides an api for initiating an xmpp session, and
providing callbacks for xmpp events (subscribe, unsubscribe, message,
etc). Dan, I don't think it has events for iq specifically, but take a
look - it's a pretty straightforward wrapper for the japper-php lib.

--Steve

--
Steve Ivy
http://redmonk.net // http://diso-project.org
This email is: [ ] bloggable [x] ask first [ ] private

Dan Brickley

unread,
Jan 27, 2008, 5:46:24 AM1/27/08
to diso-p...@googlegroups.com
On 27/01/2008, Steve Ivy <stev...@gmail.com> wrote:
>
> Hi guys (waves at danbri)
>
> The xmpp plugin is back (and updated!) in the repo, under
> wordpress/wp-xmpp/branches/experimental/.

Looks good! I Just ran the example on commandline and it connected
fine (presume you intended to leave functional login details there for
now). Have you had any success wiring it up to Google Talk's Jabber
service? I tried both with talk.google.com and gmail.com as the server
names,
the latter doesn't connect at all, and the former gives:

DBG: connecting: talk.google.com 5222 15
DBG: SEND: <?xml version='1.0' encoding='UTF-8' ?>

DBG: SEND: <stream:stream to='talk.google.com' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'>

DBG: SEND:
DBG: RECV: <stream:stream from="talk.google.com" id="BDB4175AC8730766"
xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
DBG: RECV (partial): <stream:error><host-unknown
xmlns="urn:ietf:params:xml:ns:xmpp-streams"/><str:text
xmlns:str="urn:ietf:params:xml:ns:xmpp-streams">Set the 'to' attribute
of stream element to the domain part of the user's JID. Example:
to='gmail.com'.</str:text></stream:error></stream:stream>


LiveJournal, by contrast, just worked. The galk fiddlyness I've run
into with other libraries, I guess is just a matter of figuring out
where to send which domain name. Someone told me there is some magic
voodoo in the dns that means harcoding of a google specific condition
can be avoided, but I'm afraid I forget the detail.

> The plugin provides an api for initiating an xmpp session, and
> providing callbacks for xmpp events (subscribe, unsubscribe, message,
> etc). Dan, I don't think it has events for iq specifically, but take a
> look - it's a pretty straightforward wrapper for the japper-php lib.

I'll start with trying to get something working with SPARQL and the
plain jabber-php lib then, before getting over-ambitious. My SPARQL /
XMPP binding is wrong anyway as I mentioned, so I ought to work on
that first anyway before ending up with too many variant
clients/servers.

cheers,

Dan

Dan Brickley

unread,
Jan 27, 2008, 6:34:08 AM1/27/08
to diso-p...@googlegroups.com

I tried a nasty brutish shortcut,

# ugly danbri hack for gtalk
if ($this->_server_host != "talk.google.com") {
$this->_send("<stream:stream
to='{$this->_server_host}' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'{$xmpp_version}>\n");
} else {
$this->_send("<stream:stream
to='gmail.com' xmlns='jabber:client'
xmlns:stream='http://etherx.jabber.org/streams'{$xmpp_version}>\n");
}

...in class_Jabber.php _connect_socket()

Using these settings,
define("JABBER_SERVER","talk.google.com");
define("JABBER_USERNAME","danbrickley");

But it bombs out with:

DBG: Unrecognized stream packet

So much for my meddling with things I don't understand!

cheers,

Dan

Reply all
Reply to author
Forward
0 new messages