Openfire WebSocket Plugin Readme

Overview

This plugin extends Openfire to support WebSocket. The implementation follows the XMPP WebSocket subprotocol (RFC 7395) specification, which is a standard extension of the WebSocket protocol specification (RFC 6455).

Note that the BOSH (http-bind) capabilities of Openfire must be enabled and correctly configured as a prerequisite before installing this plugin. The WebSocket servlet is installed within the same context as the BOSH component, and will reuse the same HTTP/S port(s) when establishing the WebSocket connection.

Installation

Please note that the functionality provided by this plugin is added to Openfire direclty in version 4.2.0. This plugin is no longer needed in Openfire 4.2.0 or later!

Copy websocket.jar into the plugins directory of your Openfire installation. The plugin will then be automatically deployed. To upgrade to a new version, copy the new websocket.jar file over the existing file.

Upon installation, the WebSocket URI path will be /ws/ on the same server/port as the BOSH connector. To establish a secure WebSocket, modify the following URL as appropriate:

    wss://your.openfire.host:7443/ws/

Configuration

The WebSocket plugin implements the Stream Management (XEP-0198) "ack" capabilities introduced with Openfire 4.0. This provides assurance for XMPP packet delivery by allowing the peers to agree on the number of stanzas exchanged. Two system properties are available to configure this feature:

stream.management.active
Boolean property to enable/disable stream management (default: true)
stream.management.unsolicitedAckFrequency
Integer property indicating frequency of unsolicited ack's from the server to the client (default: 0)

XEP-0198 allows either party (client or server) to send unsolicited ack/answer stanzas on a periodic basis. This implementation approximates BOSH ack behavior by sending unsolicited stanzas from the server to the client after a configurable number of stanzas have been received from the client.

Setting the system property to "1" would indicate that each client packet should be ack'd by the server when stream management is enabled for a particular stream. To disable unsolicited server acks, use the default value for system property "stream.management.unsolicitedAckFrequency" ("0"). This setting does not affect server responses to explicit ack requests from the client.