anchor.diff:  		 local_peer_id = none,
   		 info_hash = none,
   
  +		 fast_extension = false, % Peer uses fast extension
  +
   		 pieces_left,
   		 seeder = false,
   		 tcp_socket = none,
  
positive.code: 		   Socket,
  		   S#state.local_peer_id,
  		   S#state.info_hash) of
  		{ok, _ReservedBytes, PeerId}
  		  when PeerId == S#state.local_peer_id ->
  		    {stop, normal, S};
  		{ok, _ReservedBytes, PeerId} ->
  		    complete_connection_setup(S#state { tcp_socket = Socket,
  						        remote_peer_id = PeerId});
  		{error, _} ->
  		    {stop, normal, S}
  	    end;
  	{error, _Reason} ->
  	    {stop, normal, S}
      end;
  handle_cast({complete_handshake, ReservedBytes, Socket, RemotePeerId}, S) ->
      ReservedBytes = [],
      case etorrent_peer_communication:complete_handshake(Socket,
  							S#state.info_hash,
  							S#state.local_peer_id) of
  	ok -> complete_connection_setup(S#state { tcp_socket = Socket,
  						  remote_peer_id = RemotePeerId });
  	{error, stop} -> {stop, normal, S}
      end;
  handle_cast(choke, S) ->
  
negative.code:     gen_server:cast(Pid, {endgame_got_chunk, Chunk}).
  
  %%--------------------------------------------------------------------
  %% Function: complete_handshake(Pid, Capabilities, Socket, PeerId)
  %% Description: Complete the handshake initiated by another client.
  %%--------------------------------------------------------------------
  complete_handshake(Pid, Capabilities, Socket, PeerId) ->
      gen_server:cast(Pid, {complete_handshake, Capabilities, Socket, PeerId}).
  
  queue_pieces(Pid) ->
      gen_server:cast(Pid, queue_pieces).
  