HttpWorkerRequest.ReadEntityBody Method

Definition

Overloaded. Reads request data from the client (when not preloaded).

Overloads

ReadEntityBody(Byte[], Int32)

Reads request data from the client (when not preloaded).

ReadEntityBody(Byte[], Int32, Int32)

Reads request data from the client (when not preloaded) by using the specified buffer to read from, byte offset, and maximum bytes.

Remarks

An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached.

Use this overload to specify the response for message bodies greater than 2 GB.

ReadEntityBody(Byte[], Int32)

Reads request data from the client (when not preloaded).

C#
public virtual int ReadEntityBody(byte[] buffer, int size);

Parameters

buffer
Byte[]

The byte array to read data into.

size
Int32

The maximum number of bytes to read.

Returns

The number of bytes read.

Remarks

An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached.

Use this overload to specify the response for message bodies greater than 2 GB.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

ReadEntityBody(Byte[], Int32, Int32)

Reads request data from the client (when not preloaded) by using the specified buffer to read from, byte offset, and maximum bytes.

C#
public virtual int ReadEntityBody(byte[] buffer, int offset, int size);

Parameters

buffer
Byte[]

The byte array to read data into.

offset
Int32

The byte offset at which to begin reading.

size
Int32

The maximum number of bytes to read.

Returns

The number of bytes read.

Remarks

An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached.

Use this overload to specify the response for message bodies greater than 2 GB.

Applies to

.NET Framework 4.8.1 i druge verzije
Proizvod Verzije
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1