anchor.diff:  -behaviour(escalus_connection).
   
   -include_lib("exml/include/exml_stream.hrl").
  +-include_lib("exml/include/exml.hrl").
   -include("escalus.hrl").
   
   %% API exports
  
positive.code:     {ok, Pid} = gen_server:start_link(?MODULE, [Opts1, self()], []),
      Pid.
  
  -spec send(pid(), exml:element()) -> ok.
  send(Pid, Elem) ->
      gen_server:cast(Pid, {send, Elem}).
  
  -spec is_connected(pid()) -> boolean().
  is_connected(Pid) ->
  
negative.code:     {stop, normal, ok, S}.
  
  
  -spec handle_cast({send, exml:element() | iodata()}, state()) ->
      {noreply, state()} | {stop, term(), state()}.
  handle_cast({send, #xmlel{} = Elem}, State) ->
      handle_cast({send, exml:to_iolist(Elem)}, State);
  handle_cast({send, Data}, #state{ on_request = OnRequestFun } = State) ->
      OnRequestFun(maybe_compress_and_send(Data, State)),
      {noreply, State};
  handle_cast(reset_parser, #state{parser = Parser} = State) ->
      {ok, NewParser} = exml_stream:reset_parser(Parser),
  