anchor.diff:      Reply = ok,
       {reply, Reply, State}.
   
  -%%--------------------------------------------------------------------
  -%% Function: handle_cast(Msg, State) -> {noreply, State} |
  -%%                                      {noreply, State, Timeout} |
  -%%                                      {stop, Reason, State}
  -%% Description: Handling cast messages
  -%%--------------------------------------------------------------------
   handle_cast({What, Id, Pid}, S) ->
       ok = alter_state(What, Id, Pid),
       {noreply, S};
  
positive.code:     end,
      ok.
  
  fetch_rate(Where, Id, Pid) ->
      case ets:lookup(Where, {Id, Pid}) of
          [] ->
  
negative.code: get_torrent_rate(Id, Direction) ->
      gen_server:call(?SERVER, {get_torrent_rate, Id, Direction}).
  
  -spec send_rate(integer(), pid(), float()) -> ok.
  send_rate(Id, Pid, Rate) ->
      gen_server:cast(?SERVER, {send_rate, Id, Pid, Rate, unchanged}).
  
  -spec global_rate() -> {float(), float()}.
  global_rate() ->
      gen_server:call(?SERVER, global_rate).
  
  %% ====================================================================
  
  init([]) ->
      RTid = ets:new(etorrent_recv_state, [protected, named_table,
                                           {keypos, #rate_mgr.pid}]),
  