anchor.diff:                  compress = false,
                   event_client,
                   on_reply,
  -                on_request}).
  +                on_request,
  +                active = true,
  +                replies = []}).
   
   %%%===================================================================
   %%% API
  
positive.code:     {noreply, State};
  handle_cast(reset_parser, #state{parser = Parser} = State) ->
      {ok, NewParser} = exml_stream:reset_parser(Parser),
      {noreply, State#state{parser = NewParser}}.
  
  handle_info({tcp, Socket, Data}, State) ->
      inet:setopts(Socket, [{active, once}]),
      handle_data(Socket, Data, State);
  handle_info({ssl, Socket, Data}, State) ->
      ssl:setopts(Socket, [{active, once}]),
      handle_data(Socket, Data, State);
  handle_info({tcp_closed, Socket}, #state{socket = Socket} = State) ->
      {stop, normal, State};
  handle_info(_, State) ->
  
negative.code: 
  get_transport(#client{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_transport).
  
  %%%===================================================================
  %%% Low level API
  %%%===================================================================
  
  get_active(#client{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_active).
  
  set_active(#client{rcv_pid = Pid}, Active) ->
      gen_server:call(Pid, {set_active, Active}).
  
  -spec recv(#client{}) -> xmlstreamelement() | empty.
  recv(#client{rcv_pid = Pid}) ->
      gen_server:call(Pid, recv).
  
  %%%===================================================================
  %%% gen_server callbacks
  