anchor.diff:      {ok, RecBuf} = application:get_env(estatsd, udp_recbuf),
       {ok, BatchMax} = application:get_env(estatsd, udp_max_batch_size),
       {ok, BatchAge} = application:get_env(estatsd, udp_max_batch_age),
  +    {ok, Socket} = gen_udp:open(Port, [binary, {active, once},
  +                                       {recbuf, RecBuf}]),
  +    {ok, RealPort} = inet:port(Socket),
       error_logger:info_msg("estatsd will listen on UDP ~p with recbuf ~p~n",
  -                          [Port, RecBuf]),
  +                          [RealPort, RecBuf]),
       error_logger:info_msg("batch size ~p with max age of ~pms~n",
                             [BatchMax, BatchAge]),
  -    {ok, Socket} = gen_udp:open(Port, [binary, {active, once},
  -                                       {recbuf, RecBuf}]),
  -    {ok, #state{port = Port, socket = Socket,
  +    {ok, #state{port = RealPort, socket = Socket,
                   batch = [],
                   batch_max = BatchMax,
                   batch_max_age = BatchAge}}.
   
  +handle_call(what_port, _From, #state{port = Port} = State) ->
  +    {reply, {ok, Port}, State};
   handle_call(_Request, _From, State) ->
       {noreply, ok, State}.
   
  
positive.code: %% ------------------------------------------------------------------
  
  start_link() ->
      gen_server:start_link(?MODULE, [], []).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Definitions
  
negative.code: %% API Function Exports
  %% ------------------------------------------------------------------
  
  -export([
           start_link/0,
           what_port/0
          ]).
  
  %% ------------------------------------------------------------------
  %% gen_server Function Exports
  