node-xmpp

Sub-modules

We've split node-xmpp into a set of submodules, realistically its now one of these that you'll want to use rather than node-xmpp itself. This project remains so existing users can continue to use the project, and as a location for integration tests. New users should make use of the sub-modules.

Building XML Elements

Strophe.js' XML Builder is very convenient for producing XMPP
stanzas. ltx includes it in a much more primitive way: the
c(), cnode() and t() methods can be called on any Element
object, returning the new child element.

This can be confusing: in the end, you will hold the last-added child
until you use up(), a getter for the parent. Connection.send()
first invokes tree() to retrieve the uppermost parent, the XMPP
stanza, before sending it out the wire.

Browser Support

node-xmpp now comes with a prebuilt browser bundle:

<scriptsrc="/node_modules/node-xmpp/node-xmpp-browser.js"></script>

<scripttype="text/javascript">

var client =newXMPP.Client(opts);

</script>

Keepalives

Rather than send empty packets in order to keep any socket alive please try the following:

this.client.connection.socket.setTimeout(0)

this.client.connection.socket.setKeepAlive(true, 10000)

Where this.client is the result of new require('node-xmpp').Client().

Development Roadmap

For the next releases, we will focus on stability and security of node-xmpp. Pull requests are welcome to position node-xmpp as the best, most secure and most stable xmpp library for nodejs.

node-xmpp-core:

manifesto: support the STARTTLS method in XMPP as specified in RFC 6120, including mandatory-to-implement cipher suites and certificate validation consistent with RFC 6125

manifesto: prefer the latest version of TLS (TLS 1.2) #192

manifesto: disable support for the older and less secure SSL standard (SSLv2 and SSLv3)