nng_mqtt_msg_encode(3) NAME nng_mqtt_msg_encode - encode a mqtt message from proto_data to nng_msg_body and nng_msg_header SYNOPSIS #include <nng/nng.h> int nng_mqtt_msg_encode(nng_msg **msgp); DESCRIPTION The nng_mqtt_msg_encode() function encodes a mqtt message to body and header. RETURN VALUES This function returns 0 on success, and non-zero otherwise. ERRORS SEE ALSO nng_mqtt_msg_alloc(3), nng_mqtt_msg_decode(3), nng_msg_free(3), nng_msg_body(3), nng_msg_dup(3), nng_msg_header(3), nng_msg_header_len(3), nng_msg_len(3), nng_msg_capacity(3), nng_msg_reserve(3), nng_msg_realloc(3), nng_strerror(3), nng_msg(5), nng(7)