anchor.diff:      {noreply, State};
   handle_cast(reset_parser, #state{parser = Parser} = State) ->
       {ok, NewParser} = exml_stream:reset_parser(Parser),
  -    {noreply, State#state{parser = NewParser}}.
  +    {noreply, State#state{parser = NewParser}};
  +handle_cast(stop, State) ->
  +    {stop, normal, State}.
   
   handle_info({tcp, Socket, Data}, State) ->
       inet:setopts(Socket, [{active, once}]),
  -    handle_data(Socket, Data, State);
  +    NewState = handle_data(Socket, Data, State),
  +    {noreply, NewState};
   handle_info({ssl, Socket, Data}, State) ->
       ssl:setopts(Socket, [{active, once}]),
  -    handle_data(Socket, Data, State);
  +    NewState = handle_data(Socket, Data, State),
  +    {noreply, NewState};
   handle_info({tcp_closed, Socket}, #state{socket = Socket} = State) ->
       {stop, normal, State};
   handle_info(_, State) ->
  
positive.code: 
  get_transport(#client{rcv_pid = Pid}) ->
      gen_server:call(Pid, get_transport).
  
  %%%===================================================================
  %%% gen_server callbacks
  
negative.code:          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).
  
  