Skip to content

Latest commit

 

History

History
75 lines (59 loc) · 2.29 KB

nng_mqtt_msg_set_connect.3.adoc

File metadata and controls

75 lines (59 loc) · 2.29 KB

nng_mqtt_msg_set_connect(3)

NAME

nng_mqtt_msg_set_connect - set mqtt connect message

SYNOPSIS

#include <nng/nng.h>

void nng_mqtt_msg_set_connect_proto_version(nng_msg *msgp, uint8_t proto_version);
void nng_mqtt_msg_set_connect_keep_alive(nng_msg *msgp, uint16_t keep_alive);
void nng_mqtt_msg_set_connect_client_id(nng_msg *msgp, const char * client_id);
void nng_mqtt_msg_set_connect_will_topic(nng_msg *msgp, const char * will_topic);
void nng_mqtt_msg_set_connect_will_msg(nng_msg *msgp, const char * will_msg);
void nng_mqtt_msg_set_connect_will_retain(nng_msg *msgp, bool will_retain) ;
void nng_mqtt_msg_set_connect_user_name(nng_msg *msgp, const char *user_name);
void nng_mqtt_msg_set_connect_password(nng_msg *msgp, const char *password);
void nng_mqtt_msg_set_connect_clean_session(nng_msg *msgp, bool clean_session);

DESCRIPTION

The nng_mqtt_msg_set_connect_xxx() function is used to set mqtt connect message options before finishing nng_mqtt_msg_encode():

proto_version,
keep_alive,
client_id,
will_topic,
will_msg,
will_retain,
user_name,
password,
clean_session;

RETURN VALUES

None.

ERRORS

None.