Wed, 03 Feb 2010 21:00:04 +0000
Add getUniqueId() method
xmpp.js | file | annotate | diff | comparison | revisions |
--- a/xmpp.js Wed Feb 03 19:29:21 2010 +0000 +++ b/xmpp.js Wed Feb 03 21:00:04 2010 +0000 @@ -118,6 +118,8 @@ closed: recontext(this, this._stream_closed) }); + this._uniqueId = 0; + return this; }; @@ -145,6 +147,12 @@ this.socket.send(data.toString()); }, + + getUniqueId: function (suffix) + { + return ++this._uniqueId + (suffix?(":"+suffix):""); + }, + // Update the status of the connection, call connect_callback _setStatus: function (status, condition) {