-
[] Implement
CONNECT
Packet Types & Sending Connect Packet- Build Fixed Header
- Build Variable Header
- Build Connect Flags
- Build Keep Alive
- Build & Encode Client ID
- [] Build & Encode Will Topic
- [] Build & Encode Will Message
- [] Test Full Connect packet with will topic & will message included.
-
Implement Decoding
CONNACK
Packet Types- Connack Decoding hex buffer as Uint8Array.
- Emit events using connect return codes as filter. EG:
connect-accepted
-
Implement
PUBLISH
Packet Types- Build PUB Packet Headers & Payload
-
Implement
DISCONNECT
Packet Types -
Implement
PINGREQ
Packet Types -
Implement filtering
PINGRESP
- Emit event when
PINGRESP
happens
- Emit event when
-
[] Implement
SUBSCRIBE
Packet Type- Emit event when
SUBACK
happens - Send subscribe packet
- Subscribe to array of topics or a single topic done.
- [] Add array of QoS instead of single QoS
- [] Check Subscribe docs for missed parts
- Emit event when
-
[] Implement
SUBACK
- Emit an event when
SUBACK
happens - Return packetID with emitted event as an argument
- Add multiple topic check if client subscribed to multiple topics (Tested with three different topics)
- Emit an event when
-
Implement
UNSUBSCRIBE
- Unsubbing from single and multiple topics tested.
-
Implement
UNSUBACK
with event emitters. -
Implement decoding received
PUBLISH
Packet from Broker-
PUBACK
-
PUBREC
-
PUBREL
- [] Check docs for missed parts
-
-
[] Use net module emitter instead of creating a new emitter.
-
[] Reconnecting after tcp socket drops due to keep alive interval
-
Add typed-emitter
-
[] Tested functions
- general-helpers/buildConnectFlags
- general-helpers/buildVariableHeader
- general-helpers/parseSubscribePacket
- general-helpers/convertKeepAliveToHex
-
[] Add reconnect logic
-
[] Random client name if it's not provided