Example #1
0
        public static HttpBody InstanceBodyData()
        {
            HttpBody body = new HttpBody();

            body.Data = BodyBufferPool.Pop();
            return(body);
        }
Example #2
0
 public static HttpBody InstanceBodyData()
 {
     HttpBody body = new HttpBody();
     body.Data = BodyBufferPool.Pop();
     return body;
   
 }
Example #3
0
 public void ReadTo(HttpBody body)
 {
     long length = mReadCount >= body.Data.BufferLength ? body.Data.BufferLength : mReadCount;
     mStream.Read(body.Data.Array, 0, (int)length);
     body.Data.SetInfo(0, (int)length);
     mReadCount -= length;
     if (mReadCount == 0)
         body.Eof = true;
 }
Example #4
0
 public void ReadTo(HttpBody body)
 {
     long length = mReadCount >= body.Data.BufferLength ? body.Data.BufferLength : mReadCount;
     Buffer.BlockCopy(mData, (int)mPostion, body.Data.Array, 0, (int)length);
     
     body.Data.SetInfo(0, (int)length);
     mReadCount -= length;
     mPostion += length;
     if (mReadCount == 0)
         body.Eof = true;
 }
Example #5
0
        public void ReadTo(HttpBody body)
        {
            long length = mReadCount >= body.Data.BufferLength ? body.Data.BufferLength : mReadCount;

            mStream.Read(body.Data.Array, 0, (int)length);
            body.Data.SetInfo(0, (int)length);
            mReadCount -= length;
            if (mReadCount == 0)
            {
                body.Eof = true;
            }
        }
Example #6
0
        public void ReadTo(HttpBody body)
        {
            long length = mReadCount >= body.Data.BufferLength ? body.Data.BufferLength : mReadCount;

            Buffer.BlockCopy(mData, (int)mPostion, body.Data.Array, 0, (int)length);

            body.Data.SetInfo(0, (int)length);
            mReadCount -= length;
            mPostion   += length;
            if (mReadCount == 0)
            {
                body.Eof = true;
            }
        }