dbg_printf(" ==position 1==== \n\r");
memset((void *)&network, 0, sizeof(network));
SSLConfig SSLConfig = {0};
/// NetworkInit(&network, &SSLConfig, 1);
NetworkInit(&network);
MQTTClientInit(&client, &network, 30000, sendbuf, sizeof(sendbuf), readbuf, sizeof(readbuf));
dbg_printf(" ===position 2=== \n\r");
char* address = SERVER_DOMAIN;
if ((rc = NetworkConnect(&network, "使用的是域名,不是IP", 1883)) != 0)
{
dbg_printf(" ==position 3==rc = %d \n\r",rc);
/* 如果网络连接失败,记录日志并清理MQTT客户端资源 */
mqtt_exam_log("Return code from network connect is %d", rc);
MQTTClientDeinit(&client);
goto exit;
}