mqttclient icon indicating copy to clipboard operation
mqttclient copied to clipboard

A high-performance, high-stability, cross-platform MQTT client, developed based on the socket API, can be used on embedded devices (FreeRTOS / LiteOS / RT-Thread / TencentOS tiny), Linux, Windows, Mac...

Results 51 mqttclient issues
Sort by recently updated
recently updated
newest added

请问如何支持X.509证书认证,需要连接aws iot的MQTT服务器

杰神,请看这是由内存检测工具打出来的log: 执行以下命令: ```valgrind --tool=memcheck --leak-check=yes --show-reachable=yes ./my_app``` 在做这件事情之前,我已经修复了内部线程退出时由linux pthread模块引发的内存泄漏问题,文件:linux\platform_thread.c的platform_thread_destroy函数: ``` void platform_thread_destroy(platform_thread_t* thread) { if (NULL != thread) { pthread_detach(thread->thread); //内存释放 platform_memory_free(thread); thread = NULL; } } ``` mqtt_release.c文件:int mqtt_release(mqtt_client_t*...

1、关于static void mqtt_yield_thread(void *arg)函数内存泄漏问题 当内部线程退出时并没有真正释放里面的内存,这是因为platform_thread_init里面的malloc并没有被释放掉,因此当调用mqtt_release接口时会有1个内存泄漏。 2、int mqtt_list_subscribe_topic(mqtt_client_t* c) 该函数中有一个未被使用的变量i在编译时会产生警告,已去除。

please add libuv support and example

调用vTaskDelete(NULL)之后任务就在当前语句停止了,其后面的代码不会再被执行 在实际开发过程中, vTaskDelete(NULL); iccid_return_num = 3; 错误原因分析,在任务删除之后(调用vTaskDelete(NULL)之后),这个任务就在这个函数停止了,这行代码后面的代码不再执行,所以iccid_return_num无法赋值为3,正确的做法是 iccid_return_num = 3; vTaskDelete(NULL); @jiejieTop 大神麻烦看一下,是不是正确

/mqtt/mqttclient-master/libmqttclient/include/mqttclient.h:79: error: types may not be defined in 'sizeof' expressions /mqtt/mqttclient-master/libmqttclient/include/mqttclient.h:79: error: types may not be defined in '__alignof__' expressions /mqtt/mqttclient-master/libmqttclient/include/mqttclient.h:88: error: types may not be defined in 'sizeof' expressions...

您好,我看您给出的test/emqx/test_ca.c当中有两个ca证书,为啥要使用两个ca证书连接呢?我使用您给的例程跑起来过大概一分钟报错0x0008,无法连接。我使用自己的账号加mqtt.fx连接,ca证书只有一份,其中配置用户名、密码、ca.crt,协议为SSLv3,即可连接。但是当在程序中使用这一份ca证书连接时却无法连接,大约1秒钟就报错network/nettype_tls.c:30 返回错误0x0004。

[I] >> ../mqttclient/mqttclient.c:985 mqtt_connect_with_results()... mqtt connect success...[INFO ][2022-03-18 21:13:04][/home/yuanmajun/develop.proj/htao/HT-RMT-LINUX-RAM/src/transfer/mqtt/MqttCliMng.cpp:162] mqtt conn ali info : host : iot-060a06ph.mqtt.iothub.aliyuncs.com clientid : 860723956940406|securemode=3,signmethod=hmacsha256,timestamp=1647637983000| username : 860723956940406&g8n5Ybke7Pe pwd : 58D8D06B7C929A0D1E9B8DC06D1A22F1A63A178EEC5B64B5D04326AE60B1D730 ret : -4

建议修改Linux平台的platform_timer_usleep实现,usleep是非可重入的,也是非线程安全的,而且延迟时间不精确,延时超过1秒时,也是不符合函数的使用规定的。建议使用信号量实现,或者使用select。 ``` /*sleep in us*/ void usSleep(unsigned int nusecs) { struct timeval tval; tval.tv_sec = nusecs / 1000000; tval.tv_usec = nusecs % 1000000; select(0, NULL, NULL, NULL, &tval); } ```

有一个改善C++支持的改动: https://github.com/GorgonMeducer/PLOOC/commit/f057e721fd5edad903dcc395ea41c1c6373d98ae#diff-d25954aa0a7449205867a7880bf37e59c2134a6b0dd579263fa1cdd746b7a6d5 ![image](https://user-images.githubusercontent.com/13148491/228366907-6340dac7-8f38-48f1-86f6-1fa49b02797e.png)