View Source mqtt_sessions_process (mqtt_sessions v2.5.2)

Process handling one single MQTT session. MQTT connections attach and detach from this session. Buffers outgoing messages if there is not connection attached.

Link to this section Summary

Link to this section Functions

Link to this function

code_change(Vsn, State, Extra)

View Source
-spec get_transport(pid()) -> {ok, mqtt_sessions:transport()} | {error, notransport | noproc}.
-spec get_user_context(pid()) -> {ok, term()} | {error, noproc}.
Link to this function

handle_call(Cmd, From, State)

View Source
Link to this function

handle_info(Info, State)

View Source
Link to this function

incoming_connect(Pid, Msg, Options)

View Source
-spec incoming_connect(pid(), mqtt_packet_map:mqtt_packet(), mqtt_sessions:msg_options()) -> ok.
Link to this function

incoming_data(Pid, Data)

View Source
-spec incoming_data(pid(), binary()) -> ok | {error, wrong_connection | mqtt_packet_map:decode_error()}.
-spec kill(pid()) -> ok.
Link to this function

set_user_context(Pid, UserContext)

View Source
-spec set_user_context(pid(), term()) -> ok | {error, noproc}.
Link to this function

start_link(Pool, ClientId, SessionOptions)

View Source
-spec start_link(Pool :: atom(), ClientId :: binary(), mqtt_sessions:session_options()) -> {ok, pid()}.
Link to this function

terminate(Reason, State)

View Source
Link to this function

update_user_context(Pid, Fun)

View Source
-spec update_user_context(pid(), fun((term()) -> term())) -> ok | {error, noproc}.