- 2023-07-11mosquitto遇到严重错误时会退出循环
while(run){ do{ rc=mosquitto_loop(mosq,timeout,max_packets); }while(run&&rc==MOSQ_ERR_SUCCESS); /*Quitafterfatalerrors.*/ switch(rc){ caseMOSQ_ERR_NOMEM: caseMOSQ_ERR_PROTOCOL: caseMOSQ_ERR_INVAL: caseMOSQ_ERR_NOT_FO
- 2023-02-08Home Assistant MQTT发现服务的实现
HomeAssistantMQTT发现服务的实现MQTT收发基于mosquito以下内容摘自官方文档,可查看文档原文MQTTDiscoveryThediscoveryofMQTTdeviceswillenableonetouse
- 2022-11-02Linux c 开发-29 mosquitto库保持连接的两种方式
方式1while(1){intrc=mosquitto_loop(mosq,-1,1);if(rc){printf("mqtt_portal:mosquitto_looprc=%d\n",rc);