Module mqtt_sessions_will

Watchdog process, publishes the will if a session process fails.

Copyright © 2018 Marc Worrell

Behaviours: gen_server.

Authors: Marc Worrell (marc@worrell.nl).

Description

Watchdog process, publishes the will if a session process fails.

Function Index

code_change/3
connected/4
disconnected/1
disconnected/3Signal the will process that the session got disconnected from the client.
handle_call/3
handle_cast/2
handle_info/2
init/1
reconnected/1
set_user_context/2Set a new user context, needed after reauthentication.
start_link/2
stop/1Sync request to stop the will process.
terminate/2

Function Details

code_change/3

code_change(Vsn, State, Extra) -> any()

connected/4

connected(Pid::pid(), Will::map() | undefined, SessionExpiry::non_neg_integer(), UserContext::term()) -> ok

disconnected/1

disconnected(Pid::pid()) -> ok

disconnected/3

disconnected(Pid::pid() | undefined, IsWill::boolean(), ExpiryInterval::non_neg_integer()) -> ok

Signal the will process that the session got disconnected from the client.

handle_call/3

handle_call(Msg, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(X1, State) -> any()

init/1

init(X1) -> any()

reconnected/1

reconnected(Pid::pid()) -> ok

set_user_context/2

set_user_context(Pid::pid(), UserContext::term()) -> ok

Set a new user context, needed after reauthentication

start_link/2

start_link(Pool::atom(), SessionPid::pid()) -> {ok, pid()}

stop/1

stop(Pid::pid() | undefined) -> ok

Sync request to stop the will process

terminate/2

terminate(Reason, State) -> any()


Generated by EDoc