摘要: 方式一 void *test_thread(void *arg); pthread_create(&pid, pthread_arr1,test_thread, NULL); 方式二 void test_thread(void *arg); pthread_create(&pid, NULL,(vo 阅读全文
posted @ 2022-11-02 23:52 zhaogaojian 阅读(39) 评论(0) 推荐(0) 编辑
摘要: ###方式1 while (1) { int rc = mosquitto_loop(mosq, -1, 1); if (rc) { printf("mqtt_portal: mosquitto_loop rc = %d \n", rc); sleep(1); mosquitto_reconnect 阅读全文
posted @ 2022-11-02 23:10 zhaogaojian 阅读(187) 评论(0) 推荐(0) 编辑