Esempio n. 1
0
        public override int ReadEntityBody(byte [] buffer, int size)
        {
            if (buffer == null || size <= 0)
            {
                return(0);
            }

            if (requestId > -1)
            {
                byte [] readBuffer;
                int     nr = requestBroker.Read(requestId, size, out readBuffer);
                if (nr > 0 && readBuffer != null)
                {
                    Buffer.BlockCopy(readBuffer, 0, buffer, 0, nr);
                }
                return(nr);
            }
            return(worker.Read(buffer, 0, size));
        }