HttpWorkerRequest.SendResponseFromFile 方法

定义

将文件的内容添加到响应。Adds the contents of a file to the response.

重载

SendResponseFromFile(IntPtr, Int64, Int64)

将指定文件的内容添加到响应,并指定文件中的开始位置以及要发送的字节数。Adds the contents of the specified file 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 specified file 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 specified file to the response and specifies the starting position in the file and the number of bytes to send.

public:
 abstract void SendResponseFromFile(IntPtr handle, long offset, long length);
public abstract void SendResponseFromFile (IntPtr handle, long offset, long length);
abstract member SendResponseFromFile : nativeint * int64 * int64 -> unit
Public MustOverride Sub SendResponseFromFile (handle As IntPtr, offset As Long, length As Long)

参数

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.

SendResponseFromFile(String, Int64, Int64)

将指定文件的内容添加到响应,并指定文件中的开始位置以及要发送的字节数。Adds the contents of the specified file to the response and specifies the starting position in the file and the number of bytes to send.

public:
 abstract void SendResponseFromFile(System::String ^ filename, long offset, long length);
public abstract void SendResponseFromFile (string filename, long offset, long length);
abstract member SendResponseFromFile : string * int64 * int64 -> unit
Public MustOverride Sub SendResponseFromFile (filename As String, offset As Long, length As Long)

参数

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.

适用于