protected virtual void WriteBody(Stream output, BodyBuffer bodyBuffer) { // argument checks Debug.Assert(output != null); Debug.Assert(bodyBuffer != null); // write message body bodyBuffer.WriteBody(output); }
protected virtual void RedirectBody(Stream output, BodyBuffer bodyBuffer) { // argument checks Debug.Assert(output != null); Debug.Assert(bodyBuffer != null); // write message body bodyBuffer.RedirectBody(output, this.ContentLength); }
protected Message() { // initialize members this.headerBuffer = new HeaderBuffer(); this.bodyBuffer = new BodyBuffer(this.headerBuffer); this.modifications = new List <MessageBuffer.Modification>(); ResetThisClassLevelMessageProperties(); this.ReadingState = MessageReadingState.Error; return; }
protected virtual void ScanBody(BodyBuffer bodyBuffer) { // argument checks Debug.Assert(bodyBuffer != null); // scan body if (this.ContentLength == -1) { // chunked body bodyBuffer.SkipChunkedBody(); } else { // simple body // Call bodyBuffer.SkipBody() even if bodyLength is 0 to process prefetched bytes. bodyBuffer.SkipBody(this.ContentLength); } return; }