anchor.diff:      send_message(Msg, S, 0).
   
   send_message(Msg, S, Timeout) ->
  +    case send(Msg, S) of
  +	{ok, NS} -> {noreply, NS, Timeout};
  +	{error, closed, NS} -> {stop, normal, NS};
  +	{error, ebadf, NS} -> {stop, normal, NS}
  +    end.
  +
  +send(Msg, S) ->
       case etorrent_peer_communication:send_message(S#state.rate, S#state.socket, Msg) of
   	{ok, Rate, Amount} ->
   	    ok = etorrent_rate_mgr:send_rate(
  
positive.code: 		   S#state.parent,
  		   Rate#peer_rate.rate,
  		   Amount),
  	    {noreply, S#state { rate = Rate}, Timeout};
  	{{error, ebadf}, R, _Amount} ->
  	    error_logger:info_report([caught_ebadf, S#state.socket]),
  	    {stop, normal, S#state { rate = R}};
  	{{error, closed}, R, _Amount} ->
  	    {stop, normal, S#state { rate = R}}
      end.
  
negative.code:     error_logger:info_report([got_unknown_message, Msg, S]),
      {stop, {unknown_msg, Msg}}.
  
  handle_cast(choke, S) ->
      perform_choke(S);
  handle_cast(unchoke, S) when S#state.choke == false ->
      {noreply, S, 0};
  handle_cast(unchoke, S) when S#state.choke == true ->
  