Edit

Share via


SimpleWorkerRequest.SendResponseFromFile Method

Definition

Adds the contents of a file to the response.

Overloads

SendResponseFromFile(IntPtr, Int64, Int64)

Adds the contents of the file with the specified handle to the response and specifies the starting position in the file and the number of bytes to send.

SendResponseFromFile(String, Int64, Int64)

Adds the contents of the file with the specified name to the response and specifies the starting position in the file and the number of bytes to send.

SendResponseFromFile(IntPtr, Int64, Int64)

Adds the contents of the file with the specified handle to the response and specifies the starting position in the file and the number of bytes to send.

C#
public override void SendResponseFromFile(IntPtr handle, long offset, long length);

Parameters

handle
IntPtr

The handle of the file to send.

offset
Int64

The starting position in the file.

length
Int64

The number of bytes to send.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.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

SendResponseFromFile(String, Int64, Int64)

Adds the contents of the file with the specified name to the response and specifies the starting position in the file and the number of bytes to send.

C#
public override void SendResponseFromFile(string filename, long offset, long length);

Parameters

filename
String

The name of the file to send.

offset
Int64

The starting position in the file.

length
Int64

The number of bytes to send.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.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