ymo_mqtt_parse.h

PUBLISH_RETAIN

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718038:

Definition
#define PUBLISH_RETAIN     0x01
PUBREL_FLAGS

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718022

Definition
#define PUBREL_FLAGS       0x02
LEN_CONTINUATION

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718023

Definition
#define LEN_CONTINUATION 0x80
CONNECT_CLEAN_SESSION

http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html#_Toc398718030

Definition
#define CONNECT_CLEAN_SESSION 0x02
void mqtt_parse_reset(ymo_mqtt_session_t *session)

Used to reset the parse state for this current session (e.g. after an incoming message has been parsed to completion and handled at the protocol level, this function is invoked to prepare for the next message).

ssize_t ymo_mqtt_parse_fixed_ctrlpack(ymo_mqtt_session_t *session, const char *restrict buffer, size_t len)

Parse control packet component of the fixed header:

ssize_t ymo_mqtt_parsed_fixed_len(ymo_mqtt_session_t *session, const char *buffer, size_t len)

Parse the remaining length component of the fixed header:

ssize_t ymo_mqtt_parse_varhdr_payload(ymo_mqtt_session_t *session, const char *restrict buffer, size_t len)

Parse the variable header and payload: