Skip to content

Commit

Permalink
Added initial JSDoc. More to come with eclipse-archived#37
Browse files Browse the repository at this point in the history
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
  • Loading branch information
chombium committed Feb 17, 2017
1 parent f06e798 commit 2aa4145
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .project
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>ponte</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>com.eclipsesource.jshint.ui.builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.nodeclipse.ui.NodeNature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
<nature>tern.eclipse.ide.core.ternnature</nature>
</natures>
</projectDescription>
5 changes: 5 additions & 0 deletions lib/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
* Jovan Kostovski - added standard js for source code style checking
*******************************************************************************/

/**
* CLI module
* @description A module to hanlde the commandline and starting of Ponte
* @module
*/
var commander = require('commander')
var pkg = require('../package.json')
var path = require('path')
Expand Down
23 changes: 22 additions & 1 deletion lib/coap.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,20 @@
* Matteo Collina - initial API and implementation and/or initial documentation
* Jovan Kostovski - added standard js for source code style checking
*******************************************************************************/

/**
* CoAP Module
* @description This module handles the CoAP requests
* @module
*/
var coap = require('coap')
var rRegexp = /^\/r\/(.+)$/
var callback = require('callback-stream')

/**
* [CoAP description]
* @param {Object} opts
* @param {Function} done [description]
*/
function CoAP (opts, done) {
if (!(this instanceof CoAP)) {
return new CoAP(opts, done)
Expand Down Expand Up @@ -126,10 +135,22 @@ function CoAP (opts, done) {
})
}

/**
* Use this function to close the the CoAP server
* @param {Function} done callback to be called
* @return {[type]} [description]
*/
CoAP.prototype.close = function (done) {
this.server.close(done)
}

/**
* Handles the GET requests
* @param {string} topic The topic of the message
* @param {object} req the request object
* @param {object} res the response object
* @return {[type]} [description]
*/
CoAP.prototype._handleGET = function (topic, req, res) {
var that = this
var deliver = 'end'
Expand Down
5 changes: 5 additions & 0 deletions lib/http.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@
* Jovan Kostovski - added standard js for source code style checking
*******************************************************************************/

/**
* HTTP Module
* @description This module handles the HTTP requests
* @module
*/
var http = require('http')
var resourcesRegexp = /^\/resources\/(.+)$/
var callback = require('callback-stream')
Expand Down

0 comments on commit 2aa4145

Please sign in to comment.