MosquittoClient

Constructors

this
this(Settings s)

Destructor

~this
~this()
Undocumented in source.

Members

Functions

connect
void connect()
connected
bool connected()
disconnect
void disconnect()
loop
void loop(int timeoutMSecs)
onMessage
void onMessage(const(char)* topicZ, const(void[]) payload)
Undocumented in source. Be warned that the author may not have intended to support it.
publish
int publish(string topic, int qos, const(void)[] data, bool retain)

publish

publish
int publish(string topic, const(void)[] data, bool retain)

ditto with qos=0

reconnect
void reconnect()
subscribe
void subscribe(string pattern, int qos, void delegate(const(char)[], const(void)[]) cb)
void subscribe(string pattern, int qos, void delegate(const(void)[]) cb)

you need copy message data in callback if requires

subscribeList
void subscribeList()
Undocumented in source. Be warned that the author may not have intended to support it.
toStringzBuf
char* toStringzBuf(string str, size_t n)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

onConnectCallback
void onConnectCallback(mosquitto* mosq, void* cptr, int res)
Undocumented in source. Be warned that the author may not have intended to support it.
onDisconnectCallback
void onDisconnectCallback(mosquitto* mosq, void* cptr, int res)
Undocumented in source. Be warned that the author may not have intended to support it.
onMessageCallback
void onMessageCallback(mosquitto* mosq, void* cptr, mosquitto_message* msg)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

Callback
struct Callback
Undocumented in source.
Settings
struct Settings

Variables

_connected
bool _connected;
Undocumented in source.
buffers
Appender!(char[])[] buffers;
Undocumented in source.
mosq
mosquitto* mosq;
Undocumented in source.
onConnect
void delegate() onConnect;
Undocumented in source.
settings
Settings settings;
slist
Callback[] slist;
Undocumented in source.

Meta