anchor.diff:  
   get_states(Pid) ->
       gen_server:call(Pid, get_states).
  +
  +choke(Pid) ->
  +    gen_server:cast(Pid, choke).
  +
  +unchoke(Pid) ->
  +    gen_server:cast(Pid, unchoke).
  +
  +interested(Pid) ->
  +    gen_server:cast(Pid, interested).
  +
  +not_interested(Pid) ->
  +    gen_server:cast(Pid, not_intersted).
  
positive.code:     gen_server:cast(Master, {packet_received, Message}),
      torrent_peer:recv_loop(Socket, Master).
  
  handle_cast(startup, State) ->
      spawn_link(fun(Socket, Pid) -> recv_loop(Socket, Pid) end,
  	       [State#communication_state.socket, self()]),
      {noreply, State};
  handle_cast({receive_message, Message}, State) ->
      NewState = handle_message(Message, State),
      {noreply, NewState}.
  
  handle_info({'EXIT', _FromPid, Reason}, State) ->
      error_logger:warning_msg("Recv loop exited: ~s~n", [Reason]),
      %% There is nothing to do. If our recv_loop is dead we can't make anything out of the receiving
      %% socket.
      gen_tcp:close(State#communication_state.socket),
      exit(recv_loop_died).
  
  handle_call(get_states, _Who, State) ->
      {reply, {State#communication_state.my_state,
  	     State#communication_state.his_state}}.
  
  %% Message handling code
  handle_message(keep_alive, State) ->
      State.
  
  %% Calls
  start_link(Socket) ->
  
negative.code: -export([init/1, handle_cast/2, handle_info/2, handle_call/3, terminate/2]).
  -export([code_change/3]).
  
  -export([start_link/1, get_states/1, choke/1, unchoke/1, interested/1, not_interested/1]).
  
  -record(cstate, {my_state = {choking, not_interested},
  		 his_state = {choking, not_intersted},
  		 socket = none,
  		 transmitting = no,
  		 connection_manager_pid = no,
  		 name = no,
  		 send_pid = no}).
  
  init({Socket, ConnectionManagerPid, Name}) ->
      {ok, #cstate{socket = Socket,
  			      connection_manager_pid = ConnectionManagerPid,
  			      name = Name}}.
  
  terminate(shutdown, State) ->
      gen_tcp:close(State#cstate.socket),
      ok.
  
  code_change(_OldVsn, State, _Extra) ->
  