anchor.diff:  -define(DOWN,{'DOWN',_Ref,process,_Pid,_Reason}).
   
   -record(state, {socket,
  +                vsn,
   		chans=channel_mgr:new(),
   		sockName,
   		trace=false,
  
positive.code: handle_call({take,Socket}, _From, State) ->
      SName = p6str:sock_to_str(Socket),
      case verifySocket(Socket) of
          ok ->
              inet:setopts(Socket,[{active,once},{nodelay, true}, {recbuf,128*1024*1024},{sndbuf,128*1024*1024}]),
              con_tracker:registerConnection(self(),socket,SName,Socket),
              {reply,ok,State#state{socket=Socket,sockName=SName}};
          Other ->
              ?lerr("Failed to negotiate with client: (~s)~p -- ~p",[SName,Socket,Other]),
              {stop,normal,{error,Other},ignore}
  
negative.code: 
  verifySocket(Socket) ->
      case gen_tcp:recv(Socket,0,3000) of
          {ok, <<1, 1>>} -> {ok, v1_1};
          {ok, <<1, 0>>} -> {ok, v1_0};
          {ok, Other} -> {unknown_codec_version, {received, Other}};
          Err -> Err
      end.
  
  