anchor.diff:  %%--------------------------------------------------------------------
   complete_handshake(Pid, ReservedBytes, Socket, PeerId) ->
       gen_server:cast(Pid, {complete_handshake, ReservedBytes, Socket, PeerId}).
  -
  -%%--------------------------------------------------------------------
  -%% Function: uploaded_data(Pid, Amount)
  -%% Description: Record that we uploaded Amount bytes of data to the peer.
  -%%--------------------------------------------------------------------
  -uploaded_data(Pid, Amount) ->
  -    gen_server:cast(Pid, {uploaded_data, Amount}).
   
   %%--------------------------------------------------------------------
   %% Function: stop(Pid)
  
positive.code: %%--------------------------------------------------------------------
  handle_cast(stop, S) ->
      {stop, normal, S};
  handle_cast({connect, IP, Port}, S) ->
      case gen_tcp:connect(IP, Port, [binary, {active, false}],
  			 ?DEFAULT_CONNECT_TIMEOUT) of
  
negative.code: 
  %% API
  -export([start_link/5, connect/3, choke/1, unchoke/1, interested/1,
  	 send_have_piece/2, complete_handshake/4,
  	stop/1]).
  
  %% gen_server callbacks
  