anchor.diff:      {lists:foldl(Concat, <<>>, Chunk), State2}.
   
   read_body(State, undefined) ->
  -    read_chunk(State, <<$\0>>);
  +    read_chunk(State, <<$x>>); % FIXME $\0
   read_body(State, Size) ->
  -    read_size_chunk(State, Size, <<$\0>>).
  +    read_size_chunk(State, Size, <<$x>>). % FIXME $\0
   
   eat_empty_lines(State) ->
       case peek_byte(State) of
  -        <<$\n>> ->
  -            eat_empty_lines(eat_byte(State));
  -        _ ->
  -            State
  +        {<<$\n>>, State2} ->
  +            eat_empty_lines(eat_byte(State2));
  +        {_, State2} ->
  +            State2
       end.
   
   read_chunk(State, Sep) ->
       {Parts, State2} = read_chunk(State, Sep, []),
       {lists:reverse(Parts), State2}.
   
  -read_chunk(State = #state{buf = []}, Sep, Parts) ->
  -    State2 = read_socket(State),
  -    read_chunk(State2, Sep, Parts);
   read_chunk(State, Sep, Parts) ->
  -    [Data | Rest] = State#state.buf,
  +    [Data | Rest] = read_buffer(State),
       case binary:split(Data, Sep) of
           [Part] ->
               read_chunk(State#state{buf = Rest}, Sep, [Part | Parts]);
  
positive.code: %%% TODO: Sacar a otro modulo para hacer la parte cliente. Se podria implementar envio en streaming
  %%%       tanto en el cliente como el servidor.
  %%% TODO: Implementar las transacciones como un envio de un grupo de frames al destinatario?
  
  handle_connection(Socket, none) ->
      {ok, [{recbuf, RecvLen}]} = gen_tcpd:getopts(Socket, [recbuf]),
  
negative.code: read_size_chunk(State, Size, Sep) ->
      {Parts, State2} = read_size_chunk(State, Size, Sep, []),
      case peek_byte(State2) of
          {Sep, State3} ->
              {lists:reverse(Parts), eat_byte(State3)};
          _ ->
              throw(stomp_error)
      end.
  
  read_size_chunk(State, 0, _, Parts) ->
      {Parts, State};
  read_size_chunk(State, Size, Sep, Parts) ->
      [Data | Rest] = read_buffer(State, State#state.recv_len),
      case size(Data) of
          N when N =< Size ->
              State2 = State#state{buf = Rest},
  