Writes the fixed protocol name MQTT, protocol level 4, the connect-flags byte (clean session,
and the username/password presence bits), the keep-alive, and the payload (client id, then any
username and password). Lean on TLS for confidentiality; the credentials travel in cleartext
inside this packet.
Encodes a CONNECT packet for MQTT v3.1.1.
Writes the fixed protocol name
MQTT, protocol level 4, the connect-flags byte (clean session, and the username/password presence bits), the keep-alive, and the payload (client id, then any username and password). Lean on TLS for confidentiality; the credentials travel in cleartext inside this packet.