SMPPEX.Session.handle_pdu

You're seeing just the callback handle_pdu, go back to SMPPEX.Session module for more information.

Specs

handle_pdu(pdu :: SMPPEX.Pdu.t(), state()) ::
  {:ok, state()} | {:ok, [SMPPEX.Pdu.t()], state()} | {:stop, reason(), state()}

Invoked when the session receives an incoming PDU (which is not a response PDU).

The callback return values indicate the following:

  • {:ok, state} — use state as the new session state;
  • {:ok, pdus, state} — use state as the new session state and additionally send pdus to the connection;
  • {:stop, reason, state} — stop with reason reason and use state as the new session state.