anchor.diff:                                   ?CONNECT_TIMEOUT),
       ok = flip_send(Back, <<?PASSWORD>>),
       {ok, Back}.
  +
  +front_close_back(Back) ->
  +    info ! {delete, Back},
  +    gen_tcp:close(Back).
   
   front_start([BackAddress]) ->
       front_start([BackAddress, '8781']);
  
positive.code:                                               {ifaddr, FrontAddress},
                                                {nodelay, true},
                                                binary]),
      back_pool_new(BackAddress, BackPort),
      front_accept(Socket, BackAddress, BackPort).
  
  
negative.code:             back_pool_process(Queue)
      end.
  
  encode_tab_list(Pairs) ->
      R = encode_tab_list(Pairs, []),
      Data = lists:flatten(R),
      Data.
  
  encode_tab_list([Pair|Pairs], R) ->
      {_Back, Info} = Pair,
      EncodedInfo = erlang:integer_to_list(Info#info.id) ++ "," ++
          Info#info.address ++ "," ++
          erlang:integer_to_list(Info#info.actived_at) ++ "," ,
      encode_tab_list(Pairs, [R, EncodedInfo]);
  encode_tab_list([], R) ->
      R.
  
  info_new() ->
      Pid = spawn_link(fun() ->
                    info_loop(#status{
                        infos=ets:new(infos, []),
                        id_port=ets:new(id_port, []),
                        max_id=0
                    })
                    end),
      register(info, Pid).
  
  info_loop(Status) ->
      Infos = Status#status.infos,
      IdPort = Status#status.id_port,
      MaxId = Status#status.max_id,
      receive
          {insert, {Back, Info}} ->
              Id = MaxId + 1,
              ets:insert(Infos, {Back, Info#info{id=Id}}),
              ets:insert(IdPort, {Id, Back}),
              info_loop(Status#status{max_id=Id});
          {update, {Back, Field, Value}} ->
              [{Back, Info}] = ets:lookup(Infos, Back),
              case Field of
                  address ->
                      ets:insert(Infos, {Back, Info#info{address=Value,actived_at=unix_timestamp()}})
              end,
              info_loop(Status);
          {delete, Back} ->
              case ets:lookup(Infos, Back) of
                  [{Back, Info}] ->
                      ets:delete(Infos, Back),
                      ets:delete(IdPort, Info#info.id),
                      case ets:first(Infos) of
                          '$end_of_table' ->
                              info_loop(Status#status{max_id=0});
                          _ ->
                              info_loop(Status)
                      end;
                  _ ->
                      % io:format("cannot find port ~p~n", [Back]),
                      info_loop(Status)
              end;
          {From, get_info} ->
              From ! {info, ets:tab2list(Infos)},
              info_loop(Status);
  
          {From, get_port_by_id, Id} ->
              case ets:lookup(IdPort, Id) of
                  [{Id, Port}] ->
                      From ! {port, Port};
                  [] ->
                      From ! {port, empty}
              end,
              info_loop(Status)
      end.
  
  unix_timestamp() ->
      timer:now_diff(now(), {0,0,0}).
  
  front_get_back(BackAddress, BackPort) ->
      back_pool ! {self(), out},
      receive
  