Exemplo n.º 1
0
        public void Consume(IConsumerByteBuffer buffer)
        {
            if (_parser == null)
            {
                _parser = ResponseParser.ParserFor(buffer.ToArray());
            }
            else
            {
                _parser.ParseNext(buffer.ToArray());
            }

            buffer.Release();

            while (_parser.HasFullResponse())
            {
                var response = _parser.FullResponse();
                _progress.ConsumeCalls.WriteUsing("consume", response);
            }
        }