I'm using SMACK library (JAVA) to handle XMPP connection on an android platform and i would like to know if google support BOSH.
Recently my mobile operator locked some ports and now i'm limited to 80 and 8080 ports so BOSH would be a great solution.
thanks for your time
Well after some research and tests i conclude that is possible to connect using port 80 instead 5222 recommended by google. Connecting via port 80 doesn't use BOSH so you can use any XMPP client library to connect over.
Related
I am trying to use the MQTT javascript client from Paho. I see a example from HiveMQ, you can check it here - - http://www.hivemq.com/demos/websocket-client/
It seems to be working, however when I set the host as: test.mosquitto.org:1883, which is a mqtt broker service at mosquitto, it fails.
When I tried to connect to this mosquitto service, it gives me a error on connection - connect failed: AMQJS0007E, Socket error: undefined.
Mosquitto does not support MQTT over WebSockets out of the box. So Roger is using lighttpd with the mod_websocket module to forward.
This means that the port will be port 80 not 1883
But having just had a quick look at http://test.mosquitto.org/ws.html it seams that the lighttpd instance may be down at the moment as the demo is not working.
If you want to run your own local copy of mosquitto for testing there is a link on that page with instructions on how to build mod_websocket for lighttpd or a ubuntu ppa to download it from.
EDIT:
Mosquitto now includes WesbSocket support built in, but you will need to add an extra listener to enable it, e.g.
listener 8883
protocol websockets
As hardillb says, you need to use port 80. The full url you should use is
ws://test.mosquitto.org/mqtt
If you are using m2m.eclipse.org as Andy suggests (which is actually using apache with websockets support) then you should use
ws://m2m.eclipse.org/ws
You could try the same thing against m2m.eclipse.org which I think has websocket support switched on via lighthttpd as well.
Is there anyway in which I can check if a server supports XMPP protocol or not?
I am very new to XMPP, and I am dealing with a shared server. I am supposed to use XMPP to create a chatting system. But as I read about XMPP, I am supposed to install openfire and I have no access to the server itself.
So I want to check if the server supports xmpp or not.
Here's the XMPP RFC which includes recommended port numbers:
https://www.rfc-editor.org/rfc/rfc3920#section-15.9
So you could try connecting to port 5222 on a server (with a proper XMPP client, a plain socket in C, the telnet program, or whatever). Note also that port 5223 is used by some XMPP servers for SSL/TLS (as noted in appendix D.1. of the RFC).
I am running an online game site in which the users login to the web site and open a game client (Java applet) that communicates with the game server (also written in Java) by opening a socket connection to port 3000 of the same host.
There is a problem with this model in that sometimes the client network has firewall rules that block all ports except for port 80. So in effect the particular user can browse and login to the web site, but he cannot play because the connection to port 3000 is blocked.
I am looking for a solution to this issue and hope to hear suggestions from anyone who has had a similar experience.
Many thanks,
Andy
Can you use somesubdomain.yourhost.com:80 instead of yourhost.com:3000?
I'm developing C# software to talk to a 3rd party socket based server, "socketServer.exe".
There is an existing demo program that I can run which will let me do basic things, such as connect to "socketServer.exe" on localhost, port 5009, and grab some data.
What utility do you recommend to:
1) find out what ports "socketServer.exe" is using to communicate to the demo app;
2) monitor traffic on port 5009 between my app ("myapp.exe") and socket 5009, both on localhost.
Try nettool # http://nettool.sourceforge.net/
Hope this helps.
Johan
I´ve searched and didnt find which ports does XMPP uses.
I need to implement XMPP server and client and use XML transfer, file transfer and streaming.
Do they use different ports?? Is there a way I can make them use all the same, so I dont need to bother the network admin?
Thanks
According to Wikipedia:
5222 TCP XMPP client connection (RFC 6120) Official
5223 TCP XMPP client connection over SSL Unofficial
5269 TCP XMPP server connection (RFC 6120) Official
5298 TCP UDP XMPP JEP-0174: Link-Local Messaging / Official
XEP-0174: Serverless Messaging
8010 TCP XMPP File transfers Unofficial
The port numbers are defined in RFC 6120 § 14.7.
According to Extensible Messaging and Presence Protocol (Wikipedia), the standard TCP port for the server is 5222.
The client would presumably use the same ports as the messaging protocol, but can also use http (port 80) and https (port 443) for message delivery. These have the advantage of working for users behind firewalls, so your network admin should not need to get involved.
The ports required will be different for your XMPP Server and any XMPP Clients. Most "modern" XMPP Servers follow the defined IANA Ports for Server-to-Server 5269 and for Client-to-Server 5222. Any additional ports depends on what features you enable on the Server, i.e. if you offer BOSH then you may need to open port 80.
File Transfer is highly dependent on both the Clients you use and the Server as to what port it will use, but most of them also negotiate the connect via your existing XMPP Client-to-Server link so the required port opening will be client side (or proxied via port 80.)
The official ports (TCP:5222 and TCP:5269) are listed in RFC 6120. Contrary to the claims of a previous answer, XEP-0174 does not specify a port. Thus TCP:5298 might be customary for Link-Local XMPP, but is not official.
You can use other ports than the reserved ones, though: You can make your DNS SRV record point to any machine and port you like.
File transfers (XEP-0234) are these days handled using Jingle (XEP-0166). The same goes for RTP sessions (XEP-0167). They do not specify ports, though, since Jingle negotiates the creation of the data stream between the XMPP clients, but the actual data is then transferred by other means (e.g. RTP) through that stream (i.e. not usually through the XMPP server, even though in-band transfers are possible). Beware that Jingle is comprised of several XEPs, so make sure to have a look at the whole list of XMPP extensions.