Prosody has officially supported BOSH since 0.3. Using it is quite simple.

Firstly load the 'bosh' module, or add it to your modules_enabled line in your config file.

Next you need to tell Prosody where to run the BOSH listener. The simplest way is to add to the config the line:

 bosh_ports = { 5280 }

where 5280 is the port you want BOSH running on. It will be accessible at the default path of /http-bind/.

Alternatively you can specify just a path:

 bosh_ports = { "http-bind" }

and the default port (5280) will be used, along with this path.

For more advanced configuration, the full syntax can be used:

 bosh_ports = {
                 {
                    port = 1234;
                    path = "http-bind";
                    interface = "127.0.0.1";
                 }
              }

Multiple listeners can be started with a comma-separated list of servers:

 bosh_ports = {
                 {
                    port = 5280;
                    path = "http-bind";
                 },
                 {
                    port = 5281;
                    path = "http-bind";
                    ssl = {
                             key = "bosh.key";
                             certificate = "bosh.crt"; 
                          }
                 }
              }

The above sets up a HTTPS listener on port 5281 using the specified certificate.

Tested clients

 
doc/setting_up_bosh.txt · Last modified: 2009/12/20 17:43 (external edit)