Struct mosquitto_client::Mosquitto [] [src]

pub struct Mosquitto { /* fields omitted */ }

Mosquitto client

Methods

impl Mosquitto
[src]

[src]

create a new mosquitto instance, providing a client name. Clients connecting to a broker must have unique names

[src]

create a Callback object so you can listen to events.

[src]

connect to the broker. You can only be fully sure that a connection succeeds after the on_connect callback returns non-zero

[src]

connect to the broker, waiting for success.

[src]

call if you wish to use Mosquitto in a multithreaded environment.

[src]

[src]

subscribe to an MQTT topic, with a desired quality-of-service. The returned value can be used to directly match against received messages, and has a mid field identifying the subscribing request. on_subscribe will be called with this identifier.

[src]

unsubcribe from an MQTT topic - on_unsubscribe callback will be called.

[src]

publish an MQTT message to the broker, returning message id. Quality-of-service and whether retained can be specified. To be sure, check the message id passed to the on_publish callback

[src]

[src]

[src]

publish an MQTT message to the broker, returning message id after waiting for successful publish

[src]

explicitly disconnect from the broker.

[src]

process network events for at most timeout milliseconds. -1 will mean the default, 1000ms.

[src]

process network events. This will handle intermittent disconnects for you, but will return after an explicit disconnect() call

[src]

loop forever, but do not regard an explicit disconnect as an error.

Trait Implementations

impl Send for Mosquitto
[src]

impl Sync for Mosquitto
[src]

impl Clone for Mosquitto
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Drop for Mosquitto
[src]

[src]

Executes the destructor for this type. Read more