   def reply(from, rep) do
     GenServer.reply(from, rep)
   end
-
-  # Ranch'es granting reimplementation
 
   defp grant_socket(pid, ref, transport, socket) do
     transport.controlling_process(socket, pid)

    end
  end

  defp wait_for_data(state) do
    :ok = state.transport.setopts(state.socket, [{:active, :once}])
  end

  def handle_info(message, state) do

    case SMPP.parse(data) do
      {:ok, nil, data} ->
        new_state = %{state | buffer: data}
        wait_for_data(new_state)

      {:ok, parse_result, rest_data} ->
        handle_parse_result(state, parse_result, rest_data)
