Change to JSDoc type formatting {type}

This commit is contained in:
David Jimenez
2017-06-22 20:06:43 -05:00
parent fededfbfb1
commit 50c5655ff2
4 changed files with 59 additions and 59 deletions
+18 -18
View File
@@ -103,8 +103,8 @@ function closeSocket() {
/**
* Write PDU to socket
*
* @param buf or obj pdu - can also take PDU object
* @param bol closeAfterSend - if true will close the socket after sending
* @param {buffer|object} pdu - can also take PDU object
* @param {boolean} closeAfterSend - if true will close the socket after sending
*/
function sockWrite(pdu, closeAfterSend) {
var that = this;
@@ -139,9 +139,9 @@ function sockWrite(pdu, closeAfterSend) {
/**
* Send a PDU to the remote
*
* @param buf or obj pdu
* @param bol closeAfterSend - Will close after return is fetched. Defaults to false (OPTIONAL)
* @param func callback(err, retPdu) (OPTIONAL)
* @param {buffer|object} pdu
* @param {boolean} closeAfterSend - Will close after return is fetched. Defaults to false (OPTIONAL)
* @param {function} callback(err, retPdu) (OPTIONAL)
*/
function send(pdu, closeAfterSend, callback) {
var pduObj = pdu,
@@ -213,11 +213,11 @@ function send(pdu, closeAfterSend, callback) {
/**
* Send a return to given PDU
*
* @param obj or buf pdu
* @param str status - see list at defs.errors - defaults to 'ESME_ROK' - no error (OPTIONAL)
* @param obj params (OPTIONAL)
* @param bol closeAfterSend - if true will close the socket after sending (OPTIONAL)
* @param func callback(err, retPdu) (OPTIONAL)
* @param {buffer|object} pdu
* @param {string} status - see list at defs.errors - defaults to 'ESME_ROK' - no error (OPTIONAL)
* @param {object} [params]
* @param {boolean} closeAfterSend - if true will close the socket after sending (OPTIONAL)
* @param {function} [callback(err, retPdu)]
*/
function sendReturn(pdu, status, params, closeAfterSend, callback) {
var that = this;
@@ -259,13 +259,13 @@ function sendReturn(pdu, status, params, closeAfterSend, callback) {
/**
* Send an SMS
*
* @param obj smsOptions
* @param {object} smsOptions
* from - alphanum or international format
* to - international format
* message - string
* dlr - boolean defaults to false
* flash - boolean defaults to false
* @param func callback(err, smsIds, retPduObjs)
* @param {function} callback(err, smsIds, retPduObjs)
*/
function sendSms(smsOptions, callback) {
var pduObj = {};
@@ -310,12 +310,12 @@ function sendSms(smsOptions, callback) {
/**
* Send a longer SMS than 1120 bits
*
* @param obj smsOptions
* @param {object} smsOptions
* from - alphanum or international format
* to - international format
* message - string
* dlr - boolean defaults to false
* @param func callback(err, smsId, retPduObj)
* @param {function} callback(err, smsId, retPduObj)
*/
function sendLongSms(smsOptions, callback) {
var that = this,
@@ -483,8 +483,8 @@ function checkLongSmses() {
/**
* Generic session function
*
* @param obj sock - socket object
* @return obj (returnObj)
* @param {object} sock - socket object
* @return {object} (returnObj)
*/
function session(sock) {
var returnObj = new events.EventEmitter();
@@ -508,10 +508,10 @@ function session(sock) {
returnObj.utils = utils;
// Temporary storage for long sms parts
// These should be cleared if they lingre to long to avoid memory leaks
// These should be cleared if they linger to long to avoid memory leaks
returnObj.longSmses = {};
// Temporary storage for DLRs to long smses
// Temporary storage for DLRs to long SMSes
// We keep them like this to be able to simulate a single DLR when all parts have gotten DLRs
returnObj.longSmsDlrs = {};