anchor.diff:      end.
   
   %% @private
  +%% Connect the socket if disconnected
  +connect(State) when State#state.sock =:= undefined ->
  +    #state{address = Address, port = Port, connects = Connects} = State,
  +    case gen_tcp:connect(Address, Port,
  +                         [binary, {active, once}, {packet, 4}, {header, 1}]) of
  +        {ok, Sock} ->
  +            {ok, State#state{sock = Sock, connects = Connects+1, 
  +                             reconnect_interval = ?FIRST_RECONNECT_INTERVAL}};
  +        Error ->
  +            Error
  +    end.
  +
  +%% @private
   %% Disconnect socket if connected
   disconnect(State) ->
  -
       %% Tell any pending requests we've disconnected
       case State#state.active of
           undefined ->
  
positive.code:             {reply, true, State}
      end;
  handle_call(stop, _From, State) ->
      {stop, normal, ok, disconnect(State)}.
  
  %% @private
  handle_info({tcp_error, _Socket, Reason}, State) ->
      error_logger:error_msg("PBC client TCP error for ~p:~p - ~p\n",
                             [State#state.address, State#state.port, Reason]),
      {noreply, disconnect(State)};
      
  handle_info({tcp_closed, _Socket}, State) ->
      {noreply, disconnect(State)};
  
  %% Make sure the two Sock's match.  If a request timed out, but there was
  %% a response queued up behind it we do not want to process it.  Instead
  
negative.code: 
  -record(state, {address,    % address to connect to
                  port,       % port to connect to
                  auto_reconnect = false, % if true, automatically reconnects to server
                                          % if false, exits on connection failure/request timeout
                  queue_if_disconnected = false, % if true, add requests to queue if disconnected
                  sock,       % gen_tcp socket
                  active,     % active request
  