Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

methodtHttpServerResponse.TakeBody

procedure TakeBody(out aStream: TStream; out aOffset, aLength: Int64; out aInMemory: Boolean);
HANDS THE BODY TO THE WIRE SESSION, which is what lets it be sent without a copy: aStream is the object holding it, positioned nowhere in particular, and the body is aLength octets from aOffset. The caller OWNS aStream from here and frees it; the response is left with no body. aInMemory says whether those octets are already in memory (content set with SetContent and friends) or are read from aStream as they are sent (a file). aStream is nil when there is no body.