HttpServer.HttpResponse.SendBody C# (CSharp) Method

SendBody() public method

Make sure that you have specified ContentLength and sent the headers first.
This method can be used if you want to send body contents without caching them first. This is recommended for larger files to keep the memory usage low.
If headers have not been sent.
public SendBody ( byte buffer ) : void
buffer byte
return void
        public void SendBody(byte[] buffer)
        {
            if (!HeadersSent)
                throw new InvalidOperationException("Send headers, and remember to specify ContentLength first.");

            _sent = true;
            _context.Send(buffer);
        }

Same methods

HttpResponse::SendBody ( byte buffer, int offset, int count ) : void