strophe - XMPP: retrieving BOSH Session ID and RID -


please tell me how retrieve sid , jid. using strophe js.

<body rid='489923353' xmlns='http://jabber.org/protocol/httpbind' sid='ab7f5957' to='127.0.0.1' xml:lang='en' xmpp:restart='true' xmlns:xmpp='urn:xmpp:xbosh'/>  var conn = new strophe.connection(bosh_service);  

however, conn.sid or conn.rid not returning same numbers.

after , that, think found answer!

else if(status === strophe.status.connected){          //get roster         var iq = $iq({type: 'get'}).c('query', {xmlns: 'jabber:iq:roster'});         chat.connection.sendiq(iq, chat.on_roster);           //on chat         chat.connection.addhandler(chat.on_message,null, "message", "chat");          $("#presence").html("connection sid" + chat.connection.sid + "connection rid" +  chat.connection.rid);     } 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -