Skip to content

Instantly share code, notes, and snippets.

View Gealber's full-sized avatar
🎯
Focusing

Gealber Morales Gealber

🎯
Focusing
View GitHub Profile
@Gealber
Gealber / mqtt.c
Last active May 21, 2021 21:51
Adding support for username in mqtt
/* Add the username flag to the CONNECT Variable Header*/
static char user_flag(char flag)
{
char usr_flag = (char)0x80;
flag |= usr_flag;
return flag;
}
/* mqtt_connect_user send the CONNECT command with the
* user supplied*/