Hulaaki.Connection
Provides a GenServer process that is responsible for sending and receving message to/from an MQTT broker over a tcp connection
Summary↑
connect(pid, message, opts) | Sends a Connect message over the connection (with options) |
disconnect(pid, message \\ Hulaaki.Message.disconnect()) | Sends a Disconnect message over the connection |
ping(pid, message \\ Hulaaki.Message.ping_request()) | Sends a Ping message over the connection |
publish(pid, message) | Sends a Publish message over the connection |
publish_release(pid, message) | Sends a Publish release message over the connection |
start_link(client_pid) | Start the Genserver process with a pid that intends to use the connection |
stop(pid) | Stops the Genserver process |
subscribe(pid, message) | Sends a Subscribe message over the connection |
unsubscribe(pid, message) | Sends an Unsubscribe message over the connection |
Functions
Sends a Connect message over the connection (with options)
Sends a Disconnect message over the connection
Sends a Ping message over the connection
Sends a Publish message over the connection
Sends a Publish release message over the connection
Start the Genserver process with a pid that intends to use the connection
Stops the Genserver process
Sends a Subscribe message over the connection
Sends an Unsubscribe message over the connection