smppex v0.1.1 SMPPEX.MC behaviour

Summary

Types

request :: term
send_pdu_result :: :ok | {:error, term}
socket :: port | :ssl.sslsocket
state :: term
transport :: module

Functions

call(mc, request, timeout \\ 5000)

Specs

call(pid, term, timeout) :: term
cast(mc, request)

Specs

cast(pid, term) :: :ok
handle_pdu(mc, pdu)

Specs

handle_pdu(pid, SMPPEX.Pdu.t) :: :ok
handle_send_pdu_result(mc, pdu, send_pdu_result)

Specs

handle_send_pdu_result(pid, SMPPEX.Pdu.t, send_pdu_result) :: :ok
handle_stop(mc)

Specs

handle_stop(pid) :: :ok
reply(mc, pdu, reply_pdu)

Specs

reply(pid, SMPPEX.Pdu.t, SMPPEX.Pdu.t) :: :ok
send_pdu(mc, pdu)

Specs

send_pdu(pid, SMPPEX.Pdu.t) :: :ok
start(mod_with_args, opts \\ [])

Specs

start({module, term}, Keyword.t) ::
  {:ok, :ranch.ref} |
  {:error, reason :: term}
stop(mc_server)

Specs

stop(:ranch.ref) :: :ok
stop_session(mc)

Specs

stop_session(pid) :: :ok

Callbacks

handle_call(request, arg1, state)

Specs

handle_call(request, GenServer.from, state) ::
  {:reply, reply :: term, state} |
  {:noreply, state}
handle_cast(request, state)

Specs

handle_cast(request, state) :: state
handle_info(request, state)

Specs

handle_info(request, state) :: state
handle_pdu(arg0, state)

Specs

handle_pdu(SMPPEX.Pdu.t, state) :: state
handle_resp(arg0, arg1, state)

Specs

handle_resp(SMPPEX.Pdu.t, SMPPEX.Pdu.t, state) :: state
handle_resp_timeout(arg0, state)

Specs

handle_resp_timeout(SMPPEX.Pdu.t, state) :: state
handle_send_pdu_result(arg0, arg1, state)

Specs

handle_stop(state)

Specs

handle_stop(state) :: any
init(socket, transport, args)

Specs

init(socket, transport, args :: term) ::
  {:ok, state} |
  {:stop, reason :: term}