anchor.diff:                       true -> ?MEMCACHE_ADDQ;
                        false -> ?MEMCACHE_ADD
                    end,
  -            case get_key(Port, Key) of
  +            case get_key(Parent, Port, Key) of
                   undefined ->
  -                    put_key(Port, Key, Bytes, undefined),
  +                    put_key(Parent, Port, Key, Bytes, undefined),
                       case Quiet of
                           true -> <<>>;
                           false -> canned_responses(Kind, Index, Key, Op, stored)
  
positive.code: %%% INTERNAL FUNCTIONS
  %%%-----------------------------------------------------------------------------
  
  handle_data(Sock, Port, Data) ->
      {Response, Unparsed} = response(Port, Data),
      ct:log("sending response ~p~nremaining data ~p", [iolist_to_binary(Response),
                                                        iolist_to_binary(Unparsed)]),
      send(Sock, iolist_to_binary(Response)),
      %% this assumes any remaining buffered data includes only complete requests.
      case Unparsed of
          <<>> ->
              ok;
          _ ->
              handle_data(Sock, Port, Unparsed)
      end.
  
  %% We send one byte at a time to test that we are handling package split correctly
  
negative.code:     end.
  
  
  loop(Parent, Sock, Port, Opts) ->
      loop(Parent, Sock, Port, Opts, <<>>).
  
  loop(Parent, Sock, Port, Opts, Buf) ->
      case gen_tcp:recv(Sock, 0) of
          {ok, Data} ->
              handle_data(Parent, Sock, Port, <<Buf/binary, Data/binary>>),
              loop(Parent, Sock, Port, Opts, Buf);
          {error, _Reason} = Error ->
              Error
      end.
  