ch32v307vct6的mqtt例程中,mqtt保活间隔 data.keepAliveInterval = 2000; 是多少秒?

void MQTT_Connect(char *username, char *password)

{

    MQTTPacket_connectData data = MQTTPacket_connectData_initializer;

    u32 len;

    u8 buf[200];


    data.clientID.cstring = "ch32v307";

    data.keepAliveInterval = 2000;

    data.cleansession = 1;

    data.username.cstring = username;

    data.password.cstring = password;


    len = MQTTSerialize_connect(buf,sizeof(buf),&data);

    Transport_SendPacket(buf,len);

}


您好,单位是秒


只有登录才能回复,可以选择微信账号登录