     GenServer.cast(esme, {:reply, pdu, reply_pdu})
   end
 
+  def stop(esme) do
+    GenServer.cast(esme, :stop)
+  end
+
   def handle_pdu(esme, pdu) do
     GenServer.call(esme, {:handle_pdu, pdu})
   end


  @default_timer_resolution 100

  @type state :: any
  @type args :: any
  @type reason :: any

  @callback init(args) :: {:ok, state} | {:close, reason}

  @callback handle_pdu(Pdu.t, state) :: state



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

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

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

  def info(esme, request) do
    Kernel.send esme, {:info, request}
  end

  # GenServer callbacks
