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

![image](https://user-images.githubusercontent.com/111162720/188890807-eb72ab8f-4a3b-4508-b813-dd4bc029f7dc.png) ![image](https://user-images.githubusercontent.com/111162720/188890916-29c1a0a4-6847-4677-a8d5-325701b339d0.png) 执行完脚本./build.sh,在./build/bin找不到可执行文件

有很多需求要在mqtt成功连接时发送一些报文,但是目前mqttclient没有此功能。 重连回调函数当重连成功时也不会触发,只会在尝试重连时触发,并不能满足需求。

![image](https://user-images.githubusercontent.com/24492495/187197355-335d873d-16f3-46cc-a367-b493c38160cb.png)

enum在我的平台上并不是int(四位),反而是char(1位),引起了对齐错误,导致死机

FreeRTOS implementation of platform_thread_destroy free the pointer passed to the function and later the same pointer is freed again at [mqttclient/mqttclient.c#L959](https://github.com/jiejieTop/mqttclient/blob/956e0c8dcac02d4b107ccb49f1990c7718b6b585/mqttclient/mqttclient.c#L959) This will cause possible double free for FreeRTOS implementation.

Compiler generate unused variable 'i' warning in mqtt_list_subscribe_topic when MQTT_LOG_LEVEL < MQTT_LOG_INFO_LEVEL.

在mattclient.h中,定义了枚举类型 typedef enum mqtt_qos { QOS0 = 0, QOS1 = 1, QOS2 = 2, SUBFAIL = 0x80 } mqtt_qos_t; 后面的代码中,对QoS有个指针强转,而enum的长度并不固定,有一定的概率引起非对齐访问的问题。

大佬, 请教下我现在是对接一个私有云,使用的是自签名证书,客户端需要用到以下三个文件,我需要如何实现? 连接服务器时所使用的CA.crt文件 连接服务器时所使用的client.crt文件 连接服务器时所使用的client.key文件 目前看到demo只是设置CA证书==》mqtt_set_ca(client, (char*)test_ca_get());,自签名双向认证是否支持?麻烦指导下,谢谢 ![1703482501144](https://github.com/jiejieTop/mqttclient/assets/154773055/02003516-294c-4a61-b10d-0d9e4924aba9)

仅仅只有一个setsockopt设置超时时间,在超时或者服务端连接主动断开的情况下,无法有效识别连接断开 建议增加通过 getsockopt 获取 SO_ERROR值,进行判断是 EAGAIN,还是 ENOTCONN 等其它连接异常错误, 以便提升连接丢失情况下的重连速度

topic: topic1_subscribe message:{ "VIN":"1C22C00001", "terminalID":0, "frameID":10, "sysDataType":1002, "timestamp":1532345667, "code":"01", "data":{ "RCU":"FAFAFAFAFAFAFAFA", "BCM":"FAFAFAFAFAFAFAFA", "DC":"FAFAFAFAFAFAFAFA", "EHB1":"FAFAFAFAFAFAFAFA", "EHB2":"FAFAFAFAFAFAFAFA", "EPB1":"FAFAFAFAFAFAFAFA", "EPB2":"FAFAFAFAFAFAFAFA", "EPS[2024-01-23 00:51:51.380] [warning] ---------------------------971 #define MQTT_MAX_PACKET_ID (0xFFFF - 1) #define MQTT_TOPIC_LEN_MAX 64 #define...