Copyright © 2018 Marc Worrell
Behaviours: gen_server.
Authors: Marc Worrell (marc@worrell.nl).
client_id/1 | Generate a new (random) ClientID of 20 bytes. |
code_change/3 | |
find_session/2 | Find the session process for the given pool name and client. |
handle_call/3 | |
handle_cast/2 | |
handle_info/2 | |
init/1 | |
kill_session/2 | Force a session to close, no DISCONNECT to be sent. |
register/3 | Register a session with the registry, called by the session. |
routing_id/1 | Generate a new (random) RoutingId of 22 bytes. |
start_link/0 | |
terminate/2 | |
whois/1 | Find the name and pool for the session process. |
client_id(Pool::atom()) -> binary()
Generate a new (random) ClientID of 20 bytes. A ClientID may be 1 to 23 utf8 encoded bytes.
code_change(Vsn, State, Extra) -> any()
find_session(Pool::atom(), Pid::binary() | pid()) -> {ok, pid()} | {error, notfound}
Find the session process for the given pool name and client.
handle_call(X1, From, State) -> any()
handle_cast(Cmd, State) -> any()
handle_info(X1, State) -> any()
init(X1::[]) -> {ok, #state{}}
kill_session(Pool::atom(), ClientId::binary()) -> ok
Force a session to close, no DISCONNECT to be sent.
register(Pool::atom(), ClientId::binary(), Pid::pid()) -> ok | {error, duplicate}
Register a session with the registry, called by the session.
routing_id(Pool::atom()) -> binary()
Generate a new (random) RoutingId of 22 bytes. A ClientID may be 1 to 23 utf8 encoded bytes.
start_link() -> {ok, pid()} | {error, term()}
terminate(Reason, State) -> any()
whois(Pid::pid()) -> {ok, {atom(), binary()}} | {error, notfound}
Find the name and pool for the session process
Generated by EDoc