Classes
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 |
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 |
(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.
(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.
(static) onConnected(reconnecting)
Called as soon as a new connection has been established, either by logging in or by attaching to an existing BOSH session.
Parameters:
Name | Type | Description |
---|---|---|
reconnecting |
Boolean | Whether Converse.js reconnected from an earlier dropped session. |
(static) onConnected(reconnecting)
Called as soon as a new connection has been established, either by logging in or by attaching to an existing BOSH session.
Parameters:
Name | Type | Description |
---|---|---|
reconnecting |
Boolean | Whether Converse.js reconnected from an earlier dropped session. |
(static) setDisconnectionCause(cause, reasonopt, overrideopt)
Used to keep track of why we got disconnected, so that we can decide on what the next appropriate action is (in onDisconnected)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cause |
Number | The status number as received from Strophe. |
|
reason |
String |
<optional> |
An optional user-facing message as to why there was a disconnection. |
override |
Boolean |
<optional> |
An optional flag to replace any previous disconnection cause and reason. |
(static) setDisconnectionCause(cause, reasonopt, overrideopt)
Used to keep track of why we got disconnected, so that we can decide on what the next appropriate action is (in onDisconnected)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cause |
Number | The status number as received from Strophe. |
|
reason |
String |
<optional> |
An optional user-facing message as to why there was a disconnection. |
override |
Boolean |
<optional> |
An optional flag to replace any previous disconnection cause and reason. |