Not logged in. · Lost password · Register
Forum: agsXMPP RSS
How to establish a BOSH connection between client and server.
Avatar
baibars #1
Member since Apr 2011 · 2 posts
Group memberships: Members
Show profile · Link to this post
Subject: XMPP Over BOSH
Dear Sir,


In order to establish a BOSH connection between client and server, I have change the connection type from "Direct" to "BOSH" and the server address from "myserver.com" to http://myserver.com:7070/http-bind/ and also I've changed the port to 7070. Nevertheless, I couldn't establish the connection and I encounterd a lot of errors and exceptions.

So, what I have to do?

Thanks,
This post was edited 3 times, last on 2012-01-31, 19:57 by Alex.
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you only have to change the following 2 properties:

  1. _connection.SocketConnectionType = agsXMPP.net.SocketConnectionType.Bosh;
  2. _connection.ConnectServer = "http://server.com:5280/http-bind/";

The Port property doesn't matter for BOSH, because the Port is in the Url. The Server property is your XMPP domain and exactly the same as for Non-BOSH connections.

If it sill does not work please post your Debug Xml if there is any.

Alex
Avatar
baibars #3
Member since Apr 2011 · 2 posts
Group memberships: Members
Show profile · Link to this post
Thank you Mr. Alex for your reply.

But my client still not working over BOSH.

OnWriteXml event occurs only one time with this xml:

<stream:stream to=server.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0' xml:lang='en'>


without any occurrence of OnReadXml event.



Thanks,
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
It looks like the Bosh connection can not be established. Are you sure that the bosh url and server setup is correct?

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS