Expand description
The C ABI for the MQTT transport.
These functions wrap [pamoja_mqtt] for callers that reach the SDK through
the flat C boundary. Because that boundary has no async support, the crate
owns a single multi-threaded Tokio runtime and each call blocks on it until
the underlying async operation completes; a host that wants concurrency runs
these calls on its own threads. The shared transport sits behind an async
mutex, mirroring the Node and Python bindings so behavior matches across
languages.
Structs§
- Pamoja
Mqtt Client - An opaque handle to an MQTT client transport.
- Pamoja
Mqtt Config - Connection settings for an MQTT client.
- Pamoja
Mqtt Message - An opaque handle to a message received from a subscribed topic.
Enums§
- Pamoja
Qos - MQTT delivery guarantee, mirroring the protocol’s quality-of-service levels.
Functions§
- pamoja_
mqtt_ ⚠client_ connect - Connects to the broker and starts the background event loop.
- pamoja_
mqtt_ ⚠client_ disconnect - Closes the connection and stops the background event loop.
- pamoja_
mqtt_ ⚠client_ free - Releases an MQTT client handle.
- pamoja_
mqtt_ ⚠client_ is_ connected - Reports whether the client currently holds an active connection.
- pamoja_
mqtt_ ⚠client_ new - Creates a disconnected MQTT client from the given settings.
- pamoja_
mqtt_ ⚠client_ publish - Publishes a payload to a topic.
- pamoja_
mqtt_ ⚠client_ recv - Awaits the next message from any subscribed topic.
- pamoja_
mqtt_ ⚠client_ subscribe - Subscribes to a topic filter.
- pamoja_
mqtt_ ⚠message_ free - Releases a message handle.
- pamoja_
mqtt_ ⚠message_ payload - Returns a pointer to a message’s payload bytes.
- pamoja_
mqtt_ ⚠message_ payload_ len - Returns the length in bytes of a message’s payload.
- pamoja_
mqtt_ ⚠message_ topic - Returns the topic a message was published to.