You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/IoT.js-API-Events.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ IoT.js is based on event-driven programming where objects (called "emitters") pe
19
19
# Class: EventEmitter
20
20
21
21
The `EventEmitter` plays a role as base class for "emitters".
22
-
User application would not directly creates an instance of `EventEmitter` since `EventEmitter` is an abstract trait which defines its behavior and grants to sub-classes.
22
+
User application would not directly create an instance of `EventEmitter` since `EventEmitter` is an abstract trait which defines its behavior and grants to sub-classes.
Copy file name to clipboardExpand all lines: docs/api/IoT.js-API-MQTT.md
+4-4
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ The QoS level can be 0, 1 or 2.
20
20
- Level 1 means the packet arrives at least once (duplications might occur, it is the user's responsibility to take care of them).
21
21
- Level 2 means that the package is delivered exactly once.
22
22
23
-
### Topic seperating and wildcarding
23
+
### Topic separating and wildcarding
24
24
Topics can be wildcarded and they also can be structured into multiple levels. These levels are divided by the `/` sign (eg. `iotjs/jerryscript/jerry-core`). There are multiple wildcarding possibilities:
25
25
-`Multi-level wildcard` The `#` sign is a wildcard character that matches any number of levels within a topic. This character MUST be the last character in a topic name. Typing `iotjs/#` means the client subscribes to anything that is under the `iotjs` topic.
26
26
-`Single-level wildcard` The `+` sign is a wildcard character that matches only one topic level. It can be used more at than one level in the topic name. It MUST be used so it occupies an entire level of the name. Typing `iotjs/+/jerry-core` subscribes you to `jerry-core` topic.
@@ -36,14 +36,14 @@ The `MQTTClient` can subscribe or publish data to a broker. It sends data over a
36
36
-`host` {Buffer | string} The address of the broker.
37
37
-`port` {number} The port of the broker.
38
38
-`socket` {net.Socket | TLSSocket} If a `TLSSocket` is given for secure communication it is the user's responsibility to connect it to establish the TLS connection first. Otherwise the client automatically connects the socket to the server.
39
-
-`username` {Buffer | string} Optional. Use username when onnecting to a broker.
39
+
-`username` {Buffer | string} Optional. Use username when connecting to a broker.
40
40
-`password` {Buffer | string} Optional. Use password authentication when connecting to a broker.
41
41
-`keepalive` {number} Keepalive time in seconds. If no data is sent on the connection in the given time window the broker disconnects the client.
42
42
-`will` {boolean} Optional. If this flag is set to `true`, a `message` and a `topic` must follow with a QoS value between 0 and 2.
43
43
-`qos` {number} If `will` is set to `true`, the message will be sent with the given QoS.
44
44
-`topic` {Buffer | string} Only processed when `will` is set to `true`. The topic the `message` should be sent to.
45
45
-`message` {Buffer | string} Only processed when `will` is set to `true`. The message to be sent to the broker when connecting.
46
-
-`callback` {function} the function which will be executed when the client successfuly connected to the broker.
46
+
-`callback` {function} the function which will be executed when the client successfully connected to the broker.
47
47
48
48
Returns with an MQTTClient object and starts connecting to a broker. Emits a `connect` event after the connection is completed.
49
49
@@ -153,7 +153,7 @@ Emitted when the client successfully connects to a broker.
153
153
A `disconnect` event is emitted when the broker disconnects the client gracefully.
154
154
155
155
### `error`
156
-
If an error occured an `error` event is emitted with the error data.
156
+
If an error occurred an `error` event is emitted with the error data.
157
157
158
158
### `message`
159
159
When data is received from the server a `message` event is emitted with a `data` object. It has the following properties:
Copy file name to clipboardExpand all lines: docs/api/IoT.js-API-Timers.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -89,4 +89,4 @@ When called, requests that the IoT.js event loop should not exit as long as the
89
89
90
90
### timeout.unref()
91
91
92
-
When called, the active `Timeout` object will not force the IoT.js event loop to remain active. If there are no other scheduled activites, the process may exit, the process may exit before the `Timeout` object's callback is invoked.
92
+
When called, the active `Timeout` object will not force the IoT.js event loop to remain active. If there are no other scheduled activities, the process may exit, the process may exit before the `Timeout` object's callback is invoked.
0 commit comments