SendBody Method (Byte[], Int32, Int32)

HttpServer.dll

Make sure that you have specified ContentLength and sent the headers first.

Namespace:  HttpServer
Assembly:  HttpServer (in HttpServer.dll) Version: 1.0.0.0 (1.0.0.0)

Syntax

C#
public void SendBody(
	byte[] buffer,
	int offset,
	int count
)
Visual Basic (Declaration)
Public Sub SendBody ( _
	buffer As Byte(), _
	offset As Integer, _
	count As Integer _
)
Visual C++
public:
void SendBody(
	array<unsigned char>^ buffer, 
	int offset, 
	int count
)

Parameters

buffer
Type: array< System..::.Byte >[]()[]

[Missing <param name="buffer"/> documentation for "M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"]

offset
Type: System..::.Int32
offest of first byte to send
count
Type: System..::.Int32
number of bytes to send.

Remarks

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.

Exceptions

ExceptionCondition
System..::.InvalidOperationExceptionIf headers have not been sent.

See Also