     end
   end
 
+  @doc false
   def handle_cast({:send_pdu, pdu}, st) do
     new_st = do_send_pdu(pdu, st)
     {:noreply, new_st}

  @type send_pdu_result :: :ok | {:error, term}
  @spec handle_send_pdu_result(pid, Pdu.t, send_pdu_result) :: :ok

  def handle_send_pdu_result(esme, pdu, send_pdu_result) do
    GenServer.call(esme, {:handle_send_pdu_result, pdu, send_pdu_result})
  end

  @spec call(pid, term, timeout) :: term

  def call(esme, request, timeout \\ @default_call_timeout) do
    GenServer.call(esme, {:call, request}, timeout)
  end

  @spec cast(pid, term) :: :ok

  def cast(esme, request) do
    GenServer.cast(esme, {:cast, request})
  end

  @spec with_session(pid, (pid -> any)) :: :ok

  def with_session(esme, fun) do
    GenServer.cast(esme, {:with_session, fun})
  end

  # GenServer callbacks

  def init([host, port, mod_with_args, transport, timeout, esme_opts]) do
    esme = self
    handler = fn(ref, _socket, _transport, session) ->

    end
  end

  @doc false
  def handle_call({:handle_pdu, pdu}, _from, st) do
    case Pdu.resp?(pdu) do
      true -> do_handle_resp(pdu, st)
