anchor.diff:  %% for responding to the second form of send_request.
   send_request(#request{msg = {tunneled,MsgId,Pkt}}=Msg, State) when State#state.active =:= undefined ->
       Request = Msg#request{msg = {tunneled,MsgId}},
  -    case gen_tcp:send(State#state.sock, [MsgId|Pkt]) of
  +    Transport = State#state.transport,
  +    case Transport:send(State#state.sock, [MsgId|Pkt]) of
           ok ->
               State#state{active = Request};
           {error, closed} ->
  -            gen_tcp:close(State#state.sock),
  +            Transport:close(State#state.sock),
               maybe_enqueue_and_reconnect(Msg, State#state{sock=undefined})
       end;
   %% Unencoded Request (the normal PB client path)
   send_request(Request, State) when State#state.active =:= undefined ->
       Pkt = riak_pb_codec:encode(Request#request.msg),
  -    case gen_tcp:send(State#state.sock, Pkt) of
  +    Transport = State#state.transport,
  +    case Transport:send(State#state.sock, Pkt) of
           ok ->
               maybe_reply(after_send(Request, State#state{active = Request}));
           {error, closed} ->
  -            gen_tcp:close(State#state.sock),
  +            Transport:close(State#state.sock),
               maybe_enqueue_and_reconnect(Request, State#state{sock=undefined})
       end.
   
  
positive.code:                     NewState = NewState0#state{active = NewActive}
              end
      end,
      ok = inet:setopts(Sock, [{active, once}]),
      {noreply, NewState};
  handle_info({req_timeout, Ref}, State) ->
      case State#state.active of %%
  
negative.code: handle_info({tcp_closed, _Socket}, State) ->
      disconnect(State);
  
  handle_info({ssl_error, _Socket, Reason}, State) ->
      error_logger:error_msg("PBC client SSL error for ~p:~p - ~p\n",
                             [State#state.address, State#state.port, Reason]),
      disconnect(State);
  
  handle_info({ssl_closed, _Socket}, State) ->
      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
  %% it should drop through and be ignored.
  handle_info({Proto, Sock, Data}, State=#state{sock = Sock, active = Active})
          when Proto == tcp; Proto == ssl ->
      [MsgCode|MsgData] = Data,
      Resp = case Active#request.msg of
          {tunneled, _MsgID} ->
  