Skip to content

Commit 435ee3f

Browse files
author
Adam Rudd
committed
Docs
1 parent eeeccb1 commit 435ee3f

File tree

3 files changed

+21
-20
lines changed

3 files changed

+21
-20
lines changed

lib/client.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ util.inherits(MqttClient, events.EventEmitter);
169169
* @api public
170170
*
171171
* @example client.publish('topic', 'message');
172-
* @example client.publish('topic', 'message', {qos: 1, retain: true});
172+
* @example
173+
* client.publish('topic', 'message', {qos: 1, retain: true});
173174
* @example client.publish('topic', 'message', console.log);
174175
*/
175176
MqttClient.prototype.publish =

lib/mqtt.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ var defaultPort = 1883
1717
/**
1818
* createClient - create an MQTT client
1919
*
20-
* @param <Number> [port] - broker port
21-
* @param <String> [host] - broker host
22-
* @param <Object> [opts] - see MqttClient#constructor
20+
* @param {Number} [port] - broker port
21+
* @param {String} [host] - broker host
22+
* @param {Object} [opts] - see MqttClient#constructor
2323
* @api public
2424
*/
2525
module.exports.createClient = function(port, host, opts) {
@@ -50,9 +50,9 @@ module.exports.createClient = function(port, host, opts) {
5050
/**
5151
* createSecureClient - create a tls secured MQTT client
5252
*
53-
* @param <Number> [port]
54-
* @param <String> [host]
55-
* @param <Object> opts
53+
* @param {Number} [port]
54+
* @param {String} [host]
55+
* @param {Object} opts
5656
* @api public
5757
*/
5858
module.exports.createSecureClient = function(port, host, opts) {
@@ -89,7 +89,7 @@ module.exports.createSecureClient = function(port, host, opts) {
8989
/**
9090
* createServer - create an MQTT server
9191
*
92-
* @param <Function> listener - called on new client connections
92+
* @param {Function} listener - called on new client connections
9393
*/
9494

9595
module.exports.createServer = function(listener) {
@@ -99,9 +99,9 @@ module.exports.createServer = function(listener) {
9999
/**
100100
* createSecureServer - create a tls secured MQTT server
101101
*
102-
* @param <String> keyPath - path to private key
103-
* @param <String> certPath - path to public cert
104-
* @param <Function> listener - called on new client conns
102+
* @param {String} keyPath - path to private key
103+
* @param {String} certPath - path to public cert
104+
* @param {Function} listener - called on new client conns
105105
*/
106106

107107
module.exports.createSecureServer =
@@ -112,9 +112,9 @@ function(keyPath, certPath, listener) {
112112
/**
113113
* createConnection - create a bare MQTT connection
114114
*
115-
* @param <Number> [port]
116-
* @param <String> [host]
117-
* @param <Function> [callback]
115+
* @param {Number} [port]
116+
* @param {String} [host]
117+
* @param {Function} [callback]
118118
*/
119119
module.exports.createConnection = function(port, host, callback) {
120120
var net_client, mqtt_conn;

lib/server.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var fs = require('fs')
1111
/**
1212
* MqttServer
1313
*
14-
* @param <Function> listener
14+
* @param {Function} listener - fired on client connection
1515
*/
1616
var MqttServer = module.exports.MqttServer =
1717
function Server(listener) {
@@ -36,9 +36,9 @@ util.inherits(MqttServer, net.Server);
3636
/**
3737
* MqttSecureServer
3838
*
39-
* @param <String> privateKeyPath
40-
* @param <String> publicCertPath
41-
* @param <Function> listener
39+
* @param {String} privateKeyPath
40+
* @param {String} publicCertPath
41+
* @param {Function} listener
4242
*/
4343
var MqttSecureServer = module.exports.MqttSecureServer =
4444
function SecureServer(keyPath, certPath, listener) {
@@ -69,8 +69,8 @@ util.inherits(MqttSecureServer, tls.Server);
6969
* MqttServerClient - wrapper around Connection
7070
* Exists if we want to extend server functionality later
7171
*
72-
* @param <Stream> stream
73-
* @param <MqttServer> server
72+
* @param {Stream} stream
73+
* @param {MqttServer} server
7474
*/
7575

7676
var MqttServerClient = module.exports.MqttServerClient =

0 commit comments

Comments
 (0)