public FetchResponse(byte[] data)
        {
            var dataOffset = ParseHeaderData(data);
            Topics = new List<FetchTopic>(TopicCount);
            for (var i = 0; i < TopicCount; i++)
            {
                string topicName;
                dataOffset = BufferReader.Read(data, dataOffset, out topicName);
                var topic = new FetchTopic(topicName);
                dataOffset = topic.Parse(data, dataOffset);

                Topics.Add(topic);
            }
        }
Exemple #2
0
        public FetchResponse(byte[] data)
        {
            var dataOffset = ParseHeaderData(data);

            Topics = new List <FetchTopic>(TopicCount);
            for (var i = 0; i < TopicCount; i++)
            {
                string topicName;
                dataOffset = BufferReader.Read(data, dataOffset, out topicName);
                var topic = new FetchTopic(topicName);
                dataOffset = topic.Parse(data, dataOffset);

                Topics.Add(topic);
            }
        }