Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated function documentation according to jsdoc #131

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 20 additions & 21 deletions ping/strophe.ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ Strophe.addConnectionPlugin('ping', {
},

/**
* Function: ping
*
* Parameters:
* (String) to - The JID you want to ping
* (Function) success - Callback function on success
* (Function) error - Callback function on error
* (Integer) timeout - Timeout in milliseconds
*/
* Function: ping
*
* Parameters:
* @param {string} to - The JID you want to ping
* @param {function} success - Callback function on success
* @param {function} error - Callback function on error
* @param {number} timeout - Timeout in milliseconds
*/
ping: function(jid, success, error, timeout)
{
var id = this._c.getUniqueId('ping');
Expand All @@ -39,11 +39,11 @@ Strophe.addConnectionPlugin('ping', {
},

/**
* Function: pong
*
* Parameters:
* (Object) ping - The ping stanza from the server
*/
* Function: pong
*
* Parameters:
* @param {Object} ping - The ping stanza from the server
*/
pong: function(ping)
{
var from = ping.getAttribute('from');
Expand All @@ -53,14 +53,13 @@ Strophe.addConnectionPlugin('ping', {
},

/**
* Function: addPingHandler
*
* Parameters:
* (Function) handler - Ping handler
*
* Returns:
* A reference to the handler that can be used to remove it.
*/
* Function: addPingHandler
*
* Parameters:
* @param {Function} handler - Ping handler
*
* @returns A reference to the handler that can be used to remove it.
*/
addPingHandler: function(handler)
{
return this._c.addHandler(handler, Strophe.NS.PING, "iq", "get");
Expand Down