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