예제 #1
0
        public static MultiFetchResponse ReadFromStream(BinaryStream stream)
        {
            var request = new MultiFetchResponse();
            var length  = stream.Reader.ReadInt32();

            request.FetchResponses = new List <FetchResponse>(length);
            for (int i = 0; i < length; i++)
            {
                request.FetchResponses.Add(FetchResponse.ReadFromStream(stream));
            }

            return(request);
        }
예제 #2
0
        public static MultiFetchResponse ReadFromStream(BinaryStream stream)
        {
            var request = new MultiFetchResponse();
            var length = stream.Reader.ReadInt32();

            request.FetchResponses = new List<FetchResponse>(length);
            for (int i = 0; i < length; i++)
            {
                request.FetchResponses.Add(FetchResponse.ReadFromStream(stream));
            }

            return request;
        }
예제 #3
0
        public Response HandleMultiFetch(BinaryStream buffer)
        {
            var count = buffer.Reader.ReadInt32();

            MultiFetchResponse response = new MultiFetchResponse();
            response.FetchResponses = new List<FetchResponse>();

            for (int i = 0; i < count; i++)
            {
                var result = HandleLoadMessages(buffer);
                response.FetchResponses.Add((FetchResponse) result);
            }

            return response;
        }