https://github.com/strophe/strophejs-plugin-ping
https://github.com/strophe/strophejs-plugin-ping
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/strophe/strophejs-plugin-ping
- Owner: strophe
- Created: 2017-01-25T13:41:08.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-02-27T06:41:04.000Z (about 2 years ago)
- Last Synced: 2024-10-20T01:52:16.652Z (over 1 year ago)
- Language: JavaScript
- Size: 18.6 KB
- Stars: 3
- Watchers: 15
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.markdown
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Strophe.ping.js
Strophe.ping.js is a plugin to provide XMPP Ping
( [ XEP-0199 ]( http://xmpp.org/extensions/xep-0199.html ) ).
## 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;
}