anchor.diff:           code_change/3]).
   
   % internal exports
  --export([handle_query/6,
  +-export([handle_query/7,
            decode_msg/1]).
   
   
   -record(state, {
       socket,
  -    sent
  +    sent,
  +    tokens
   }).
   
   %
  
positive.code: socket_options() ->
      [list, inet, {active, true}].
  
  any_port() ->
      0.
  
  %
  % Public interface
  
negative.code: init([DHTPort]) ->
      {ok, Socket} = gen_udp:open(DHTPort, socket_options()),
      State = #state{socket=Socket,
                     sent=gb_trees:empty(),
                     tokens=init_tokens(3)},
      erlang:send_after(token_lifetime(), self(), renew_token),
      {ok, State}.
  
  
  