anchor.diff:      timer:sleep(2000),
       ok.
   
  +
   code_change(_OldVsn, State, _Extra) ->
       {ok, State}.
   
   
   %% External API
  -connect(State) ->
  -    case State#state.sock of
  -        undefined ->
  -            Config = ns_config:get(),
  -            Port = ns_config:search_node_prop(Config, memcached, port),
  -            error_logger:info_msg("ns_memcached connecting to memcached on port ~p~n", [Port]),
  -            {ok, Sock} = gen_tcp:connect("127.0.0.1", Port, [binary, {packet, 0}, {active, false}], 5000),
  -            Sock;
  -        Sock ->
  -            Sock
  -    end.
  -
   connected() ->
  -    connected(node()).
  +    misc:running(?MODULE).
   
   connected(Node) ->
  -    call(Node, connected).
  +    misc:running(Node, ?MODULE).
   
   create_bucket(Bucket, Config) ->
       create_bucket(node(), Bucket, Config).
  
positive.code: %% gen_server API implementation
  
  start_link() ->
      gen_server:start_link({local, ?MODULE}, ?MODULE, [], []).
  
  
  %% gen_server callback implementation
  
  init([]) ->
      self() ! connect,
      {ok, #state{}}.
  
  handle_call(connected, _From, State) ->
      Reply = case State#state.sock of
                  undefined ->
                      false;
                  _ ->
                      true
              end,
      {reply, Reply, State};
  handle_call({create_bucket, _Bucket, _Config}, _From, State) ->
      Reply = unimplemented,
      {reply, Reply, State};
  handle_call({delete_bucket, _Bucket}, _From, State) ->
      Reply = unimplemented,
      {reply, Reply, State};
  handle_call({delete_vbucket, Bucket, VBucket}, _From, State) ->
      Sock = connect(State),
      Reply = do_in_bucket(Sock, Bucket,
                          fun() ->
                                  mc_client_binary:delete_vbucket(
                                    Sock, VBucket)
                          end),
      {reply, Reply, State#state{sock=Sock}};
  handle_call(list_buckets, _From, State) ->
      Reply = {ok, ["default"]},
      {reply, Reply, State};
  handle_call({set_vbucket_state, Bucket, VBucket, VBState}, _From, State) ->
      Sock = connect(State),
      Reply = do_in_bucket(Sock, Bucket,
                           fun() ->
                                   mc_client_binary:set_vbucket_state(
                                     Sock, VBucket,
                                     atom_to_list(VBState))
                           end),
      {reply, Reply, State#state{sock=Sock}};
  handle_call({stats, Bucket, Key}, _From, State) ->
      Sock = connect(State),
      Reply = do_in_bucket(Sock, Bucket,
                           fun () ->
                                   mc_client_binary:stats(Sock, Key)
                           end),
      {reply, Reply, State#state{sock=Sock}};
  handle_call(Request, From, State) ->
      error_logger:error_msg("~p:handle_call(~p, ~p, ~p)~n",
                             [?MODULE, Request, From, State]),
      {reply, {unhandled, ?MODULE, Request}, State}.
  
  handle_cast(Msg, State) ->
      error_logger:error_msg("~p:handle_cast(~p, ~p)~n",
                             [?MODULE, Msg, State]),
      {noreply, State}.
  
  handle_info(connect, State) ->
      {noreply, State#state{sock=connect(State)}};
  handle_info(Msg, State) ->
      error_logger:error_msg("~p:handle_info(~p, ~p)~n",
                             [?MODULE, Msg, State]),
      {noreply, State}.
  
  terminate(Reason, State) ->
      error_logger:error_msg("~p:terminate(~p, ~p)~n",
  
negative.code: 
  -behaviour(gen_server).
  
  -include("ns_common.hrl").
  
  %% gen_server API
  -export([start_link/0]).
  -export([init/1, handle_call/3, handle_cast/2,
           handle_info/2, terminate/2, code_change/3]).
  
  -record(state, {sock::port()}).
  
  %% external API
  -export([connected/0, connected/1,
  