anchor.diff:  %% @private
   -spec(handle_response(binary(), #state{}) ->
                #state{}).
  -handle_response(Data, #state{queue = Queue} = State) ->
  +handle_response(Data, #state{queue  = Queue, 
  +                             socket = Socket,
  +                             nreq   = NumReq} = State) ->
       NewQueue = reply(Data, Queue),
  -    State#state{queue = NewQueue}.
  +    case NumReq of
  +        ?MAX_REQ_PER_CON ->
  +            catch gen_tcp:close(Socket),
  +            State#state{queue = NewQueue, socket = undefined, nreq = 0};
  +        _ ->
  +            State#state{queue = NewQueue, nreq = NumReq + 1}
  +    end.
   
   
   %% @doc: Send data to the 1st-client in the queue
  
positive.code:           socket :: reference()|undefined,
            reconnect_sleep :: integer(),
            buf    :: binary(),
            queue = [] :: list()
           }).
  
  
  -define(SOCKET_OPTS, [binary, {active, once}, {packet, raw}, {reuseaddr, true}]).
  -define(RECV_TIMEOUT, 5000).
  
  
  %% ===================================================================
  %% APIs
  
negative.code:                    ip = IP,
                     port = Port,
                     reconnect_sleep = ReconnectSleepInterval,
                     nreq = 0,
                     buf = <<>>,
                     queue = []},
      case connect(State) of
  