Converse converse.js

Class: connection_Connection

connection_Connection()

The Connection class manages the connection to the XMPP server. It's agnostic concerning the underlying protocol (i.e. websocket, long-polling via BOSH or websocket inside a shared worker).

Constructor

new connection_Connection()

Source:

Methods

onConnectStatusChanged(status, message)

Callback method called by Strophe as the Connection goes through various states while establishing or tearing down a connection.

Parameters:
Name Type Description
status Number
message String
Source:

(async) switchTransport()

Switch to a different transport if a service URL is available for it.

When reconnecting with a new transport, we call setUserJID so that a new resource is generated, to avoid multiple server-side sessions with the same resource.

We also call _proto._doDisconnect so that connection event handlers for the old transport are removed.

Source: