anchor.diff:  -type msg() ::  atom() | tuple().
   
   -record(state, {sock,      % protocol buffers socket
  -                hello,     % hello message from client
                   client,    % local client
                   req,       % current request (for multi-message requests like list keys)
                   req_ctx}). % context to go along with request (partial results, request ids etc)
  
positive.code:             send_error("~p", [Reason], State)
      end;
  
  process_message(#rpbgetbucketpropsreq{bucket=B, names = Names}, 
                  #state{client=C} = State) ->
      Props = C:get_bucket(B),
      PbProps = riakc_pb:pbify_bucket_props(filter_props(Names, Props)),
      Resp = #rpbgetbucketpropsresp{properties = PbProps},
      send_msg(Resp, State);
  
  process_message(#rpbsetbucketpropsreq{bucket=B, properties = RpbTerm}, 
                  #state{client=C} = State) ->
      ErlProps = riakc_pb:erlify_bucket_props(RpbTerm),
      C:set_bucket(B, ErlProps),
      send_msg(rpbsetbucketpropsresp, State);
  
  process_message(rpblistbucketsreq, 
                  #state{client=C} = State) ->
      case C:list_buckets() of
  
negative.code: %% callbacks are waiting for it.
  %%
  -spec process_message(msg(), #state{}) ->  #state{} | {pause, #state{}}.
  process_message(rpbpingreq, State) ->
      send_msg(rpbpingresp, State);
  
  