anchor.diff:      gen_server:start_link(?MODULE, [OurPeerId], []).
   
   %%====================================================================
  -%% gen_server callbacks
  -%%====================================================================
   
  -%%--------------------------------------------------------------------
  -%% Function: init(Args) -> {ok, State} |
  -%%                         {ok, State, Timeout} |
  -%%                         ignore               |
  -%%                         {stop, Reason}
  -%% Description: Initiates the server
  -%%--------------------------------------------------------------------
  +%% @private
   init([OurPeerId]) ->
       {ok, ListenSocket} = etorrent_listener:get_socket(),
       {ok, #state{ listen_socket = ListenSocket,
                    our_peer_id = OurPeerId}, 0}.
   
  -%%--------------------------------------------------------------------
  -%% Function: %% handle_call(Request, From, State) -> {reply, Reply, State} |
  -%%                                      {reply, Reply, State, Timeout} |
  -%%                                      {noreply, State} |
  -%%                                      {noreply, State, Timeout} |
  -%%                                      {stop, Reason, Reply, State} |
  -%%                                      {stop, Reason, State}
  -%% Description: Handling call messages
  -%%--------------------------------------------------------------------
  +%% @private
   handle_call(_Request, _From, State) ->
       Reply = ok,
       {reply, Reply, State}.
   
  -%%--------------------------------------------------------------------
  -%% Function: handle_cast(Msg, State) -> {noreply, State} |
  -%%                                      {noreply, State, Timeout} |
  -%%                                      {stop, Reason, State}
  -%% Description: Handling cast messages
  -%%--------------------------------------------------------------------
  +%% @private
   handle_cast(_Msg, State) ->
       {noreply, State}.
   
  -%%--------------------------------------------------------------------
  -%% Function: handle_info(Info, State) -> {noreply, State} |
  -%%                                       {noreply, State, Timeout} |
  -%%                                       {stop, Reason, State}
  -%% Description: Handling all non call/cast messages
  -%%--------------------------------------------------------------------
  +%% @private
   handle_info(timeout, S) ->
       case gen_tcp:accept(S#state.listen_socket) of
           {ok, Socket} -> handshake(Socket, S),
  
positive.code: %%%-------------------------------------------------------------------
  %%% File    : acceptor.erl
  %%% Author  : Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
  %%% Description : Accept new connections from the network.
  %%%
  %%% Created : 30 Jul 2007 by Jesper Louis Andersen <jesper.louis.andersen@gmail.com>
  %%%-------------------------------------------------------------------
  -module(etorrent_acceptor).
  
  -behaviour(gen_server).
  
negative.code:         {error, E}            -> {stop, E, S}
      end.
  
  %% @private
  terminate(_Reason, _State) ->
      ok.
  
  %% @private
  code_change(_OldVsn, State, _Extra) ->
      {ok, State}.
  
  %%--------------------------------------------------------------------
  
  handshake(Socket, S) ->
  