anchor.diff:           terminate/2,
            code_change/3]).
   
  +%% Low level API
  +-export([get_active/1,
  +         set_active/2,
  +         recv/1]).
  +
   -define(WAIT_FOR_SOCKET_CLOSE_TIMEOUT, 200).
   -define(SERVER, ?MODULE).
   
  
positive.code: 
  get_transport(#client{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_transport).
  
  %%%===================================================================
  %%% gen_server callbacks
  
negative.code:     {ok, NewParser} = exml_stream:reset_parser(Parser),
      {reply, Socket, State#state{parser = NewParser,
                                  compress = {zlib, {Zin,Zout}}}};
  handle_call(get_active, _From, #state{active = Active} = State) ->
      {reply, Active, State};
  handle_call({set_active, Active}, _From, State) ->
      {reply, ok, State#state{active = Active}};
  handle_call(recv, _From, State) ->
      {Reply, NS} = handle_recv(State),
      {reply, Reply, NS};
  handle_call(kill_connection, _, #state{} = S) ->
      close_compression_streams(S#state.compress),
      {stop, normal, ok, S};
  