Hi,

Currently I am building the very basic session initiating function for
my library. These are the initial settings:


Code:
--------------------
    
  /* Initialize variables to be sent initially while initiating connection */
  $this->content = "text/xml; charset=utf-8";
  $this->hold = 1;
  $this->wait = 300;
  $this->xmppVersion = 1.6;
  $this->secure = "true";
  
  /* Initialize variables which will be send by server while initiating 
connection */
  $this->inactivity = 30;
  $this->polling = 2;
  $this->requests = 2;
  
--------------------


I am doing nothing great as of now but simply sending the initial
stream to the ejabberd server:

Code:
--------------------
    
  $body = "";
  $body .= "<body content='".$this->content."' hold='".$this->hold."' ";
  $body .= "xmlns='http://jabber.org/protocol/httpbind' 
to='".$this->connecthost."' ";
  $body .= "wait='".$this->wait."' rid='".$this->getRid()."' 
route='xmpp:".$this->connectserver.":".$this->connectport."' 
secure='$this->secure' ";
  $body .= "ver='".$this->xmppVersion."' xmlns:xmpp='urn:xmpp:xbosh' 
xmpp:version='".$this->xmppVersion."'/>";
  $this->sendBody($body);
  
--------------------


and then on receiving the response I look for <stream:features/> node.
If not found I simply send in this:

Code:
--------------------
    
  $body = "<body xmlns='http://jabber.org/protocol/httpbind' 
rid='".$this->getRid()."' sid='".$arr["body"]["@"]["sid"]."'/>";
  $this->sendBody($body);
  
--------------------


However I just don't see any response at all generating from the local
ejabberd server.

I tried installing openfire, but I am unable to identify the BOSH
connection url for it. http://localhost:7070/http-bind , tried with
this, but it returns back a 404 page.

:( If anyone can help me out, I will be grateful :D

Regards,
Abhinav


-- 
imoracle

------------------------------------
JAXL - Jabber XMPP Library in PHP
http://code.google.com/p/jaxl
------------------------------------
------------------------------------------------------------------------
imoracle's Profile: http://www.jabberforum.org/member.php?userid=17412
View this thread: http://www.jabberforum.org/showthread.php?t=1426

Reply via email to