https://github.com/oskaritimperi/mqtt
A simple MQTT library written in C
https://github.com/oskaritimperi/mqtt
c cross-platform mqtt mqtt-client single-file
Last synced: 2 days ago
JSON representation
A simple MQTT library written in C
- Host: GitHub
- URL: https://github.com/oskaritimperi/mqtt
- Owner: oskaritimperi
- License: zlib
- Created: 2017-02-12T15:07:15.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T18:51:46.000Z (over 7 years ago)
- Last Synced: 2025-06-23T04:45:53.001Z (4 months ago)
- Topics: c, cross-platform, mqtt, mqtt-client, single-file
- Language: C
- Size: 198 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# mqtt
A simple MQTT library written in C.
# Building
Building the library requires CMake and a C compiler.
$ mkdir build
$ cd build
$ cmake ..
$ make# Creating the single file library
Creating the single file library requires python (both 2 and 3 are ok).
Execute in the build directory you created above:
$ cmake -DMQTT_AMALGAMATE=ON .
$ make amalgamateNow the amalgamation (`mqtt.c` and `mqtt.h`) is found in
`/amalgamation` directory.# Dumping sent/received data
Define `STREAM_HEXDUMP_READ` and `STREAM_HEXDUMP_WRITE` to make the library dump
read or written written data respectively to stdout. Nice for debugging.# Logging
Define `LOG_LEVEL` to one of `DEBUG`, `INFO`, `WARNING` or `ERROR` to make the
library output logging information.# Tools
There are publish/subscribe tools included in the `tools` directory and they are
built by default.