anchor.diff:      {reply, Sid, State};
   handle_call(get_rid, _From, #state{rid = Rid} = State) ->
       {reply, Rid, State};
  +handle_call(get_keepalive, _From, #state{keepalive = Keepalive} = State) ->
  +    {reply, Keepalive, State};
  +handle_call({set_keepalive, NewKeepalive}, _From, #state{keepalive = Keepalive} = State) ->
  +    {reply, {ok, Keepalive, NewKeepalive}, State#state{keepalive = NewKeepalive}};
   handle_call(stop, _From, #state{} = State) ->
       StreamEnd = escalus_stanza:stream_end(),
       NewState = send0(transport(State), exml:to_iolist(StreamEnd), State),
  
positive.code:                 parser,
                  sid = nil,
                  rid = nil,
                  requests = 0}).
  
  %%%===================================================================
  %%% API
  
negative.code: get_sid(#transport{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_sid).
  
  get_keepalive(#transport{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_keepalive).
  
  set_keepalive(#transport{rcv_pid = Pid}, NewKeepalive) ->
      gen_server:call(Pid, {set_keepalive, NewKeepalive}).
  
  %%%===================================================================
  %%% gen_server callbacks
  %%%===================================================================
  