Esempio n. 1
0
        public static HttpBody InstanceBodyData()
        {
            HttpBody body = new HttpBody();

            body.Data = BodyBufferPool.Pop();
            return(body);
        }
Esempio n. 2
0
 public static HttpBody InstanceBodyData()
 {
     HttpBody body = new HttpBody();
     body.Data = BodyBufferPool.Pop();
     return body;
   
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
            }
        }
Esempio n. 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;
            }
        }