Mercurial > eldonilo > lightstring
comparison lightstring.js @ 9:24bc40461b2c
better README
author | Sonny Piers <sonny.piers@gmail.com> |
---|---|
date | Sun, 15 Jan 2012 02:15:23 +0100 |
parents | b7a582a2b32c |
children | 9fbd0e3678b5 |
comparison
equal
deleted
inserted
replaced
8:08a8d8c4c324 | 9:24bc40461b2c |
---|---|
68 this.socket.addEventListener('open', function() { | 68 this.socket.addEventListener('open', function() { |
69 if(this.protocol !== 'xmpp') | 69 if(this.protocol !== 'xmpp') |
70 throw "Lightstring: The server located at "+that.service+" is not XMPP aware."; | 70 throw "Lightstring: The server located at "+that.service+" is not XMPP aware."; |
71 var stream = | 71 var stream = |
72 "<stream:stream to='"+that.domain+"'\ | 72 "<stream:stream to='"+that.domain+"'\ |
73 xmlns='jabber:client'\ | |
74 xmlns:stream='http://etherx.jabber.org/streams'\ | |
75 version='1.0'/>"; | |
76 //FIXME should be this but doesn't works with node-xmpp-bosh | |
77 //~ var stream = | |
78 //~ "<stream:stream to='"+that.domain+"'\ | |
73 xmlns='jabber:client'\ | 79 xmlns='jabber:client'\ |
74 xmlns:stream='http://etherx.jabber.org/streams'\ | 80 xmlns:stream='http://etherx.jabber.org/streams'\ |
75 version='1.0'/>"; | 81 version='1.0'/>"; |
76 that.socket.send(stream) | 82 that.socket.send(stream) |
77 that.emit('XMLOutput', stream); | 83 that.emit('XMLOutput', stream); |