Skip to content

Commit

Permalink
[libmqttc] cleanup and use socket as backend
Browse files Browse the repository at this point in the history
  • Loading branch information
gozfree committed Sep 21, 2021
1 parent fe41452 commit 6edc397
Show file tree
Hide file tree
Showing 9 changed files with 289 additions and 206 deletions.
8 changes: 8 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@

## Supported
| | |
|--|--|
|linux | gcc | x86_64-w64-mingw32-gcc | cmake |
|windows | Visual Studio c1 | linux-mingw | cmake |
|mac | gcc | cmake| |

### esp32
* toolchain: xtensa-esp32-elf
copy or softlink gear-lib to esp32 components dir
Expand Down
2 changes: 1 addition & 1 deletion README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| librtsp: RTSP协议,适合IPCamera和NVR开发 | librtmpc: RTMP协议,适合推流直播 |
| libsock: Socket封装 | librpc: 远程过程调用库 |
| libipc: 进程间通信 | libp2p: p2p穿透传输 |
| libhomekit: Apple homekit协议库 | |
| libmqttc: MQTT客户端协议 | libhomekit: Apple homekit协议库 |

## 异步
| | |
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ This is a collection of basic libraries.
| librtsp: Real Time Streaming Protocol server for ipcamera or NVR | librtmpc: Real Time Messaging Protocol client for liveshow |
| libsock: socket warpper api for easily use | librpc: Remote Procedure Call library |
| libipc: Inter-Process Communication, support mqueue/netlink/shm | libp2p: High level p2p punch hole library, easy API to use |
| libhomekit: Apple homekit protocol |
| libmqttc: MQTT client protocol | libhomekit: Apple homekit protocol |

## Async
| | |
Expand Down
3 changes: 2 additions & 1 deletion gear-lib/libmqttc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ TGT_LIB_SO = $(LIBNAME).so
TGT_LIB_SO_VER = $(TGT_LIB_SO).${VER}
TGT_UNIT_TEST = test_$(LIBNAME)

OBJS_LIB = $(LIBNAME).o
OBJS_LIB = $(LIBNAME).o mqttc_socket.o
OBJS_UNIT_TEST = test_$(LIBNAME).o

###############################################################################
Expand All @@ -58,6 +58,7 @@ CFLAGS += -I$(OUTPUT)/include/gear-lib
SHARED := -shared

LDFLAGS := $($(ARCH)_LDFLAGS)
LDFLAGS += -L$(OUTLIBPATH)/lib/gear-lib -ltime -lsock -lgevent -ldarray -lthread -lringbuffer
LDFLAGS += -pthread

###############################################################################
Expand Down
2 changes: 2 additions & 0 deletions gear-lib/libmqttc/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
## libmqttc
This is a simple mqtt client library based on paho.mqtt(29ab2aa).

sudo apt install mosquitto

1.mosquitto_sub -h localhost -t "will topic" -P "testpassword" -u "testuser" -v
2.test_libmqttc

Loading

0 comments on commit 6edc397

Please sign in to comment.