IP*Works! V9 - Online Help
IP*Works! V9
Questions / Feedback?

Resource Property

This is the resource for the current session.

Syntax

 xmpp.getResource([callback])
 xmpp.setResource( resource, [callback])

Default Value

"IP*Works! XMPP Agent"


Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getResource([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setResource([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

Remarks

Whenever an entity logs in to an XMPP (Jabber) server, it must provide account information as well as a resource. Resources allow multiple clients to log in using the same account. The server will forward all messages and PI data aimed at a specific resource to that resource. If a command or message is to be sent to a Jabber ID with no specified resource, the server will push that command or message out to all connected resources.

Data Type

String

 
 
Copyright (c) 2018 /n software inc. - All rights reserved.
Build 9.0.6635.0