strophejs-plugin-ping

0.0.3 • Public • Published

Strophe.ping.js

Strophe.ping.js is a plugin to provide XMPP Ping ( XEP-0199 ).

Usage

After you connected sucessfully to the XMPP server you can send a ping to a XMPP client or server:

connection.ping.ping( "serviceJID@server.org", success, error, timeout );

You can also add a ping handler to receive pings:

connection.ping.addPingHandler( handler );

Within your ping handler function you surely want to reply with a pong iq:

handler = function( ping ){
  ...
  connection.ping.pong( ping );
  ...
  return true;
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.0.3
    212
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.0.3
    212
  • 0.0.1
    2

Package Sidebar

Install

npm i strophejs-plugin-ping

Weekly Downloads

214

Version

0.0.3

License

MIT

Unpacked Size

4.14 kB

Total Files

4

Last publish

Collaborators

  • jcbrand
  • omichelsen
  • strophe-admin
  • sualko