MQTT v0.2.2 MQTT.Client behaviour View Source
A behaviour module for implementing an MQTT client.
Link to this section Summary
Link to this section Types
Link to this type
start_options()
View Source
start_options() :: %{transport: {:tcp, map()} | {:ssl, map()}, keep_alive: non_neg_integer(), protocol: iodata(), username: iodata(), password: iodata(), client_id: iodata(), clean_session: boolean(), last_will: %{topic: iodata(), message: iodata(), qos: :mqtt_packet.qos(), retain: boolean()}}
Link to this section Functions
Link to this function
start_link(module, args, options)
View Source
start_link(module(), any(), start_options()) :: {:ok, pid()}
Link to this function
start_link(name, module, args, options)
View Source
start_link(:gen.emgr_name(), module(), any(), start_options()) :: {:ok, pid()}
Link to this section Callbacks
Link to this callback
code_change(oldVsn, oldState, extra)
View Source
code_change(oldVsn :: term() | {:down, term()}, oldState :: any(), extra :: term()) :: {:ok, new_state :: any()} | term()
Link to this callback
handle_connect_error(reason, state)
View Source
handle_connect_error(reason :: term(), state :: any()) :: {:reconnect, {:backoff, min :: non_neg_integer(), max :: pos_integer()}, state :: any()} | {:stop, reason :: term()}
Link to this callback
handle_disconnect(reason, state)
View Source
handle_disconnect(reason :: term(), state :: any()) :: {:reconnect, {:backoff, min :: non_neg_integer(), max :: pos_integer()}, state :: any()} | {:stop, reason :: term()}
Link to this callback
init(args)
View Source
init(args :: any()) :: {:ok, state :: any()} | {:stop, reason :: term()}
Link to this callback
terminate(arg0, state)
View Source
terminate(:normal | :shutdown | {:shutdown, term()} | term(), state :: any()) :: any()