tortoise v0.5.0 Tortoise.Connection View Source
Establish a connection to a MQTT broker.
Todo.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor
Reconnect to the broker using the current connection configuration
Start a connection process and link it to the current process
Return the list of subscribed topics
Link to this section Types
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Reconnect to the broker using the current connection configuration.
Link to this function
start_link(connection_opts, opts \\ [])
View Source
start_link(connection_options, GenServer.options()) :: GenServer.on_start() when connection_option: {:client_id, String.t() | atom()} | {:user_name, String.t()} | {:password, String.t()} | {:keep_alive, pos_integer()} | {:will, Tortoise.Package.Publish.t()} | {:subscriptions, [{String.t(), 0..2}] | Tortoise.Package.Subscribe.t()} | {:handler, {atom(), term()}}, connection_options: [connection_option]
Start a connection process and link it to the current process.
Read the documentation on child_spec/1
if you want… (todo!)
Link to this function
subscriptions(client_id)
View Source
subscriptions(client_id()) :: Tortoise.Package.Subscribe.t()
Return the list of subscribed topics.
Given the client_id
of a running connection return its current
subscriptions. This is helpful in a debugging situation.