UNPKG
mqtt-packet
Version:
latest (9.0.2)
legacy-v4 (4.1.3)
next (8.0.0)
v3-stable (3.5.1)
9.0.2
9.0.1
9.0.0
8.2.1
8.2.0
8.1.2
8.1.1
8.1.0
8.0.0
7.1.2
7.1.1
7.1.0
7.0.0
6.10.0
6.9.1
6.9.0
6.8.1
6.8.0
6.7.0
6.6.0
6.5.0
6.4.0
6.3.2
6.3.1
6.3.0
6.2.1
6.2.0
6.1.2
6.1.1
6.1.0
6.0.0
5.6.1
5.6.0
5.5.0
5.4.0
5.3.0
5.2.2
5.2.1
5.2.0
5.1.0
5.0.0
4.1.3
4.1.2
4.1.1
4.1.0
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.5.1
3.5.0
3.4.8
3.4.7
3.4.6
3.4.5
3.4.4
3.4.3
3.4.2
3.4.1
3.4.0
3.3.1
3.3.0
3.2.0
3.1.1
3.1.0
3.0.0
2.0.1
2.0.0
1.0.3
1.0.2
1.0.1
1.0.0
Parse and generate MQTT packets like a breeze
github.com/mqttjs/mqtt-packet
mqttjs/mqtt-packet
mqtt-packet
/
packet.js
14 lines
(12 loc)
•
214 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class
Packet
{
constructor
() {
this
.cmd =
null
this
.retain =
false
this
.qos =
0
this
.dup =
false
this
.length = -
1
this
.topic =
null
this
.payload =
null
} } module.exports = Packet