Skip to content

xdumaine/jingle-stanza

Repository files navigation

#Jingle Stanza

Jingle Stanzas is a utility for using jxt to translate Jingle objects (from jingle.js) to and from xml stanzas similar to stanza.io, but for use with an xmpp library other than stanza.io. It is largely based on stanza.io, using the jxt definitions for stanzas created therein. Credit where it's due: stanza.io.

##Usage

jingleStanza = require('jingle-stanza');
jingle = new Jingle()

jingle.on('send', function(data) {
    var xml = jingleStanza.getXml(data);
    myXmppServer.send(xml);
});

myXmppServer.on('iq:set:jingle', function(stanza) {
    var data = jingleStanza.getData(stanza);
    jingle.process(data);
});

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published