anchor.diff:      StreamEnd = escalus_stanza:stream_end(),
       NewState = send0(transport(State), exml:to_iolist(StreamEnd), State),
       {stop, normal, ok, NewState}.
  +
   
   handle_cast(stop, State) ->
       {stop, normal, State};
  
positive.code:     {ok, NewParser} = exml_stream:reset_parser(Parser),
      {noreply, State#state{parser = NewParser}}.
  
  %% Handle async HTTP request replies.
  handle_info({http_reply, {_StatusAndReason, _Hdrs, Body}, Transport}, S) ->
      NS = handle_data(Body, S#state{requests = S#state.requests - 1}),
  
negative.code:                 keepalive = proplists:get_value(keepalive, Args, true),
                  wait = Wait}}.
  
  
  handle_call(get_transport, _From, State) ->
      {reply, transport(State), State};
  
  handle_call(get_sid, _From, #state{sid = Sid} = State) ->
      {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,
  