Ejemplo n.º 1
0
        protected override IOperationResult ReadResponse(PooledSocket socket)
        {
            this.result = new List <string>();

            while (true)
            {
                string response = TextSocketHelper.ReadResponse(socket);
                if (string.Compare(response, "END", StringComparison.Ordinal) == 0)
                {
                    break;
                }

                if (response.Length < 5 || string.Compare(response, 0, "ITEM ", 0, 5, StringComparison.Ordinal) != 0)
                {
                    throw new MemcachedClientException("No ITEM response received.\r\n" + response);
                }

                this.result.Add(response);
            }
            ;
            var result = new CachedumpOperationResult();

            return(result.Pass());
        }