anchor.diff:          cmd_queue,
   
           % Buffer of incoming data
  -        buf=[]
  +        buf=[],
  +
  +        % Indicates if we are blocked waiting on
  +        % more data
  +        blocked=false
           }).
   
   start_link() -> start_link("127.0.0.1", 8673).
  
positive.code:         [_] ->
              % Re-add the start block to the buffer
              NewBuf = iolist_to_binary([<<"START\n">>, Buf]),
              State#state{buf=NewBuf};
  
          % Split into the inner and outer blocks
          [Inner, Remain] ->
  
negative.code:         % Process each available command
          [Line, Remain] ->
              S1 = process_response(State#state{buf=Remain}, Line),
  
              % Keep processing if we are not blocked
              case S1#state.blocked of
                  false -> process_buffer(S1);
                  true -> State#state{blocked=false}
              end
      end.
  
  
  