   end
 
   @doc false
+  @impl true
   def handle_resp_timeout(pdus, st) do
     {:ok, process_timeouts(pdus, st)}
   end
 
-  def process_timeouts([], st), do: st
-  def process_timeouts([pdu | pdus], st) do
+  defp process_timeouts([], st), do: st
+  defp process_timeouts([pdu | pdus], st) do
     if st.pdu && Pdu.same?(pdu, st.pdu) && st.state == :wait_for_resp do
       reply(st.from, :timeout)
       process_timeouts(pdus, set_free(st))

  end

  @doc false
  def handle_send_pdu_result(pdu, result, st) do
    case result do
      :ok -> push_to_waiting({:ok, pdu}, st)

  # Session callbacks

  @doc false
  @impl true
  def init(_socket, _transport, st) do
    Process.flag(:trap_exit, true)
    {:ok, st}
  end

  @doc false
  @impl true
  def handle_call({:call, {:request, pdu}, from}, _from, st) do
    new_st = %{st | from: from, pdu: pdu, state: :wait_for_resp}
    {:reply, :ok, [pdu], new_st}
  end

  @impl true
  def handle_call(:pdus, _from, st) do
    pdus = Enum.reverse(st.additional_pdus)
    new_st = %{st | additional_pdus: []}
    {:reply, pdus, new_st}
  end

  @impl true
  def handle_call({:call, :wait_for_pdus, from}, _from, st) do
    new_st = case st.additional_pdus do
      [_ | _] ->
