anchor.diff:  %% @end
   %%--------------------------------------------------------------------
   init([Socket]) ->
  -    case inet:setopts(Socket, [{active, once}]) of
  -        ok ->
  -            {ok, Key} = application:get_env(make_proxy_server, key),
  -            {ok, #state{key=Key, socket = Socket}, ?TIMEOUT};
  -        {error, Reason} ->
  -            {stop, Reason}
  -    end.
  +    {ok, Key} = application:get_env(make_proxy_server, key),
  +    {ok, #state{key=Key, socket = Socket}, 0}.
   
   %%--------------------------------------------------------------------
   %% @private
  
positive.code:          terminate/2,
           code_change/3]).
  
  -record(state, {key, socket, remote}).
  
  -include("../../include/socks_type.hrl").
  
  
negative.code: %% @end
  %%--------------------------------------------------------------------
  
  handle_info(timeout, #state{socket = Socket, started = false} = State) ->
      case inet:setopts(Socket, [{active, once}]) of
          ok ->
              {noreply, State#state{started = true}, ?TIMEOUT};
          {error, Reason} ->
              {stop, Reason, State}
      end;
  
  %% send by OPT timeout
  handle_info(timeout, #state{started = true} = State) ->
      {stop, timeout, State};
  
  %% first message from client
  