System.Web.HttpWorkerRequest.cs

ylbtech-System.Web.HttpWorkerRequest.cs
1.返回顶部
1、
#region 程序集 System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a
// C:Program Files (x86)Reference AssembliesMicrosoftFramework.NETFrameworkv4.6.1System.Web.dll
#endregion

using System.Runtime.InteropServices;

namespace System.Web
{
    //
    // 摘要:
    //     此抽象类定义的基本辅助方法和 ASP.NET 托管代码使用来处理请求的枚举。
    [ComVisible(false)]
    public abstract class HttpWorkerRequest
    {
        //
        // 摘要:
        //     索引,它表示 HTTP Cache-Control HTTP 标头。
        public const int HeaderCacheControl = 0;
        //
        // 摘要:
        //     指定的索引号 If-None-Match HTTP 标头。
        public const int HeaderIfNoneMatch = 31;
        //
        // 摘要:
        //     指定的索引号 If-Range HTTP 标头。
        public const int HeaderIfRange = 32;
        //
        // 摘要:
        //     指定的索引号 If-Unmodified-Since HTTP 标头。
        public const int HeaderIfUnmodifiedSince = 33;
        //
        // 摘要:
        //     指定的索引号 Max-Forwards HTTP 标头。
        public const int HeaderMaxForwards = 34;
        //
        // 摘要:
        //     指定的索引号 Proxy-Authorization HTTP 标头。
        public const int HeaderProxyAuthorization = 35;
        //
        // 摘要:
        //     指定的索引号 Referer HTTP 标头。
        public const int HeaderReferer = 36;
        //
        // 摘要:
        //     指定的索引号 Range HTTP 标头。
        public const int HeaderRange = 37;
        //
        // 摘要:
        //     指定的索引号 TE HTTP 标头。
        public const int HeaderTe = 38;
        //
        // 摘要:
        //     指定的索引号User-AgentHTTP 标头。
        public const int HeaderUserAgent = 39;
        //
        // 摘要:
        //     指定的索引号 Maximum HTTP 请求标头。
        public const int RequestHeaderMaximum = 40;
        //
        // 摘要:
        //     指定的索引号 Accept-Ranges HTTP 标头。
        public const int HeaderAcceptRanges = 20;
        //
        // 摘要:
        //     指定的索引号 Age HTTP 标头。
        public const int HeaderAge = 21;
        //
        // 摘要:
        //     指定的索引号 If-Modified-Since HTTP 标头。
        public const int HeaderIfModifiedSince = 30;
        //
        // 摘要:
        //     指定的索引号 ETag HTTP 标头。
        public const int HeaderEtag = 22;
        //
        // 摘要:
        //     指定的索引号 Proxy-Authenticate HTTP 标头。
        public const int HeaderProxyAuthenticate = 24;
        //
        // 摘要:
        //     指定的索引号 Server HTTP 标头。
        public const int HeaderServer = 26;
        //
        // 摘要:
        //     指定的索引号 Set-Cookie HTTP 标头。
        public const int HeaderSetCookie = 27;
        //
        // 摘要:
        //     指定的索引号VaryHTTP 标头。
        public const int HeaderVary = 28;
        //
        // 摘要:
        //     指定的索引号 WWW-Authenticate HTTP 标头。
        public const int HeaderWwwAuthenticate = 29;
        //
        // 摘要:
        //     指定的索引号 Maximum HTTP 响应标头。
        public const int ResponseHeaderMaximum = 30;
        //
        // 摘要:
        //     指定请求的原因。
        public const int ReasonResponseCacheMiss = 0;
        //
        // 摘要:
        //     指定请求的原因。
        public const int ReasonFileHandleCacheMiss = 1;
        //
        // 摘要:
        //     指定请求的原因。
        public const int ReasonCachePolicy = 2;
        //
        // 摘要:
        //     指定请求的原因。
        public const int ReasonCacheSecurity = 3;
        //
        // 摘要:
        //     指定请求的原因。
        public const int ReasonClientDisconnect = 4;
        //
        // 摘要:
        //     指定请求的原因。 默认值为 System.Web.HttpWorkerRequest.ReasonResponseCacheMiss。
        public const int ReasonDefault = 0;
        //
        // 摘要:
        //     指定的索引号 Location HTTP 标头。
        public const int HeaderLocation = 23;
        //
        // 摘要:
        //     指定的索引号If-MatchHTTP 标头。
        public const int HeaderIfMatch = 29;
        //
        // 摘要:
        //     指定的索引号 Retry-After HTTP 标头。
        public const int HeaderRetryAfter = 25;
        //
        // 摘要:
        //     指定的索引号 From HTTP 标头。
        public const int HeaderFrom = 27;
        //
        // 摘要:
        //     指定的索引号 Connection HTTP 标头。
        public const int HeaderConnection = 1;
        //
        // 摘要:
        //     指定的索引号 Date HTTP 标头。
        public const int HeaderDate = 2;
        //
        // 摘要:
        //     指定的索引号 Keep-Alive HTTP 标头。
        public const int HeaderKeepAlive = 3;
        //
        // 摘要:
        //     指定的索引号 Pragma HTTP 标头。
        public const int HeaderPragma = 4;
        //
        // 摘要:
        //     指定的索引号 Trailer HTTP 标头。
        public const int HeaderTrailer = 5;
        //
        // 摘要:
        //     指定的索引号 Transfer-Encoding HTTP 标头。
        public const int HeaderTransferEncoding = 6;
        //
        // 摘要:
        //     指定的索引号 Upgrade HTTP 标头。
        public const int HeaderUpgrade = 7;
        //
        // 摘要:
        //     指定的索引号 Via HTTP 标头。
        public const int HeaderVia = 8;
        //
        // 摘要:
        //     指定的索引号 Warning HTTP 标头。
        public const int HeaderWarning = 9;
        //
        // 摘要:
        //     指定的索引号 Allow HTTP 标头。
        public const int HeaderAllow = 10;
        //
        // 摘要:
        //     指定的索引号 Content-Length HTTP 标头。
        public const int HeaderContentLength = 11;
        //
        // 摘要:
        //     指定的索引号 Content-Encoding HTTP 标头。
        public const int HeaderContentEncoding = 13;
        //
        // 摘要:
        //     指定的索引号 Content-Type HTTP 标头。
        public const int HeaderContentType = 12;
        //
        // 摘要:
        //     指定的索引号 Content-Location HTTP 标头。
        public const int HeaderContentLocation = 15;
        //
        // 摘要:
        //     指定的索引号 Except HTTP 标头。
        public const int HeaderExpect = 26;
        //
        // 摘要:
        //     指定的索引号 Cookie HTTP 标头。
        public const int HeaderCookie = 25;
        //
        // 摘要:
        //     指定的索引号AuthorizationHTTP 标头。
        public const int HeaderAuthorization = 24;
        //
        // 摘要:
        //     指定的索引号 Accept-Language HTTP 标头。
        public const int HeaderAcceptLanguage = 23;
        //
        // 摘要:
        //     指定的索引号 Accept-Encoding HTTP 标头。
        public const int HeaderAcceptEncoding = 22;
        //
        // 摘要:
        //     指定的索引号 Content-Language HTTP 标头。
        public const int HeaderContentLanguage = 14;
        //
        // 摘要:
        //     指定的索引号 Accept-Charset HTTP 标头。
        public const int HeaderAcceptCharset = 21;
        //
        // 摘要:
        //     指定的索引号 Last-Modified HTTP 标头。
        public const int HeaderLastModified = 19;
        //
        // 摘要:
        //     指定的索引号 Expires HTTP 标头。
        public const int HeaderExpires = 18;
        //
        // 摘要:
        //     指定的索引号 Content-Range HTTP 标头。
        public const int HeaderContentRange = 17;
        //
        // 摘要:
        //     指定的索引号 Content-MD5 HTTP 标头。
        public const int HeaderContentMd5 = 16;
        //
        // 摘要:
        //     指定的索引号 Accept HTTP 标头。
        public const int HeaderAccept = 20;
        //
        // 摘要:
        //     指定的索引号 Host HTTP 标头。
        public const int HeaderHost = 28;

        //
        // 摘要:
        //     初始化 System.Web.HttpWorkerRequest 类的新实例。
        protected HttpWorkerRequest();

        //
        // 摘要:
        //     获取当前请求的相应 Windows 事件跟踪的跟踪 ID。
        //
        // 返回结果:
        //     当前的 ASP.NET 请求跟踪 ID。
        public virtual Guid RequestTraceIdentifier { get; }
        //
        // 摘要:
        //     获取一个值,该值指示是否支持异步读取的操作。
        //
        // 返回结果:
        //     true 如果异步读取的操作都受支持;否则为 false。
        public virtual bool SupportsAsyncRead { get; }
        //
        // 摘要:
        //     获取一个值,该值指示是否支持异步刷新操作。
        //
        // 返回结果:
        //     true 如果异步刷新操作都受支持;否则为 false。
        public virtual bool SupportsAsyncFlush { get; }
        //
        // 摘要:
        //     获取到 Machine.config 文件的完整物理路径。
        //
        // 返回结果:
        //     Machine.config 文件的物理路径。
        public virtual string MachineConfigPath { get; }
        //
        // 摘要:
        //     获取根 Web.config 文件的完整物理路径。
        //
        // 返回结果:
        //     根 Web.config 文件的物理路径。
        public virtual string RootWebConfigPath { get; }
        //
        // 摘要:
        //     获取其中安装 ASP.NET 二进制文件的目录的物理路径。
        //
        // 返回结果:
        //     到 ASP.NET 二进制文件的物理目录。
        public virtual string MachineInstallDirectory { get; }

        //
        // 摘要:
        //     返回指定的 HTTP 请求标头的索引号。
        //
        // 参数:
        //   header:
        //     标头的名称。
        //
        // 返回结果:
        //     HTTP 请求标头中指定的索引号 header 参数。
        public static int GetKnownRequestHeaderIndex(string header);
        //
        // 摘要:
        //     返回指定的 HTTP 请求标头的名称。
        //
        // 参数:
        //   index:
        //     标头的索引号。
        //
        // 返回结果:
        //     HTTP 请求标头中指定的名称 index 参数。
        public static string GetKnownRequestHeaderName(int index);
        //
        // 摘要:
        //     返回指定的 HTTP 响应标头的索引号。
        //
        // 参数:
        //   header:
        //     HTTP 头的名称。
        //
        // 返回结果:
        //     HTTP 响应标头中指定的索引号 header 参数。
        public static int GetKnownResponseHeaderIndex(string header);
        //
        // 摘要:
        //     返回指定的 HTTP 响应标头的名称。
        //
        // 参数:
        //   index:
        //     标头的索引号。
        //
        // 返回结果:
        //     HTTP 响应标头中指定的名称 index 参数。
        public static string GetKnownResponseHeaderName(int index);
        //
        // 摘要:
        //     返回一个字符串,描述指定的 HTTP 状态代码的名称。
        //
        // 参数:
        //   code:
        //     HTTP 状态代码。
        //
        // 返回结果:
        //     状态说明。 例如, System.Web.HttpWorkerRequest.GetStatusDescription(System.Int32) (404)
        //     返回"找不到"。
        public static string GetStatusDescription(int code);
        //
        // 摘要:
        //     向客户端发送当前所有缓冲的响应。
        //
        // 参数:
        //   callback:
        //     要在相应异步操作完成时调用的方法。
        //
        //   state:
        //     一个用户提供的对象,用于区分此特定异步刷新操作与其他请求。
        //
        // 返回结果:
        //     除非启动异步刷新操作,否则,工作人员请求缓冲状态、 标头和响应正文。 如果基础 System.Web.HttpWorkerRequest 对象支持异步刷新和从异步模块所发生事件或异步处理程序调用此方法,以异步方式执行发送操作。
        //     否则,该实现将执行同步刷新操作。
        public virtual IAsyncResult BeginFlush(AsyncCallback callback, object state);
        //
        // 摘要:
        //     开始异步读取的请求实体正文的操作。
        //
        // 参数:
        //   buffer:
        //     数据读入的缓冲区。
        //
        //   offset:
        //     从此处开始将数据写入缓冲区的字节偏移量。
        //
        //   count:
        //     最多读取的字节数。
        //
        //   callback:
        //     要在相应异步操作完成时调用的方法。
        //
        //   state:
        //     用户提供的对象,用于区分此特定的异步读取与其他请求。
        public virtual IAsyncResult BeginRead(byte[] buffer, int offset, int count, AsyncCallback callback, object state);
        //
        // 摘要:
        //     终止与客户端连接。
        public virtual void CloseConnection();
        //
        // 摘要:
        //     等待挂起的异步刷新操作完成。
        //
        // 参数:
        //   asyncResult:
        //     对挂起的异步请求的引用。
        public virtual void EndFlush(IAsyncResult asyncResult);
        //
        // 摘要:
        //     运行时用来通知 System.Web.HttpWorkerRequest 当前的请求已完成的请求处理。
        public abstract void EndOfRequest();
        //
        // 摘要:
        //     等待挂起的异步读操作完成。
        //
        // 参数:
        //   asyncResult:
        //     对挂起的异步请求的引用。
        //
        // 返回结果:
        //     从流中读取的字节数。
        public virtual int EndRead(IAsyncResult asyncResult);
        //
        // 摘要:
        //     将所有挂起的响应数据发送到客户端。
        //
        // 参数:
        //   finalFlush:
        //     true 如果这是最后一次响应将刷新数据;否则为 false。
        public abstract void FlushResponse(bool finalFlush);
        //
        // 摘要:
        //     返回当前正在执行服务器应用程序的虚拟路径。
        //
        // 返回结果:
        //     当前应用程序的虚拟路径。
        public virtual string GetAppPath();
        //
        // 摘要:
        //     返回当前正在执行服务器应用程序的物理路径。
        //
        // 返回结果:
        //     当前应用程序的物理路径。
        public virtual string GetAppPathTranslated();
        //
        // 摘要:
        //     当在派生类中重写,返回当前的 URL 的应用程序池 ID。
        //
        // 返回结果:
        //     始终返回 null。
        public virtual string GetAppPoolID();
        //
        // 摘要:
        //     获取从客户端读取的字节数。
        //
        // 返回结果:
        //     一个 Long 包含读取的字节数。
        public virtual long GetBytesRead();
        //
        // 摘要:
        //     当在派生类中重写时获取 (X.509 标准中指定) 的证书字段从客户端发出的请求。
        //
        // 返回结果:
        //     包含整个证书内容流的字节数组。
        public virtual byte[] GetClientCertificate();
        //
        // 摘要:
        //     获取证书颁发者,以二进制格式。
        //
        // 返回结果:
        //     包含以二进制格式表示的证书颁发者的字节数组。
        public virtual byte[] GetClientCertificateBinaryIssuer();
        //
        // 摘要:
        //     当在派生类中重写返回 System.Text.Encoding 中的客户端证书已编码的对象。
        //
        // 返回结果:
        //     证书编码表示为整数。
        public virtual int GetClientCertificateEncoding();
        //
        // 摘要:
        //     当在派生类中重写时获取 PublicKey 与客户端证书相关联的对象。
        //
        // 返回结果:
        //     一个 PublicKey 对象。
        public virtual byte[] GetClientCertificatePublicKey();
        //
        // 摘要:
        //     当在派生类中重写,获取证书生效的日期。 此日期随区域设置。
        //
        // 返回结果:
        //     一个 System.DateTime 对象,表示当证书开始生效。
        public virtual DateTime GetClientCertificateValidFrom();
        //
        // 摘要:
        //     获取证书的过期日期。
        //
        // 返回结果:
        //     一个 System.DateTime 对象,表示在证书过期的日期。
        public virtual DateTime GetClientCertificateValidUntil();
        //
        // 摘要:
        //     当在派生类中重写,将返回当前连接的 ID。
        //
        // 返回结果:
        //     始终返回 0。
        public virtual long GetConnectionID();
        //
        // 摘要:
        //     当在派生类中重写请求的 uri 返回的虚拟路径。
        //
        // 返回结果:
        //     请求的 uri 路径。
        public virtual string GetFilePath();
        //
        // 摘要:
        //     请求的 uri 返回的物理文件路径 (和从虚拟路径转换为物理路径︰ 例如,"/ proj1/page.aspx"到"c:dirpage.aspx")
        //
        // 返回结果:
        //     指向请求的 URI 的翻译后的物理文件路径。
        public virtual string GetFilePathTranslated();
        //
        // 摘要:
        //     返回指定的成员的请求标头。
        //
        // 返回结果:
        //     在请求标头中返回的 HTTP 谓词。
        public abstract string GetHttpVerbName();
        //
        // 摘要:
        //     提供访问权限 (例如,"HTTP/1.1"版) 的请求的 HTTP 版本。
        //
        // 返回结果:
        //     在请求标头中返回的 HTTP 版本。
        public abstract string GetHttpVersion();
        //
        // 摘要:
        //     返回与指定索引对应的标准 HTTP 请求标头。
        //
        // 参数:
        //   index:
        //     标头的索引。 例如, System.Web.HttpWorkerRequest.HeaderAllow 字段。
        //
        // 返回结果:
        //     HTTP 请求标头。
        public virtual string GetKnownRequestHeader(int index);
        //
        // 摘要:
        //     提供访问权限的请求标头指定的成员。
        //
        // 返回结果:
        //     请求标头中返回的服务器 IP 地址。
        public abstract string GetLocalAddress();
        //
        // 摘要:
        //     提供访问权限的请求标头指定的成员。
        //
        // 返回结果:
        //     在请求标头中返回的服务器端口号。
        public abstract int GetLocalPort();
        //
        // 摘要:
        //     返回具有 URL 扩展名的资源的附加路径信息。 也就是说,对于路径 /virdir/page.html/tail, GetPathInfo 值是 /tail。
        //
        // 返回结果:
        //     资源的附加路径信息。
        public virtual string GetPathInfo();
        //
        // 摘要:
        //     获取当前已通过使用指定的缓冲区数据和字节偏移量被读取的 HTTP 请求正文的部分。
        //
        // 参数:
        //   buffer:
        //     要读取的数据。
        //
        //   offset:
        //     偏移量开始读取字节。
        //
        // 返回结果:
        //     已读取的 HTTP 请求正文的一部分。
        public virtual int GetPreloadedEntityBody(byte[] buffer, int offset);
        //
        // 摘要:
        //     返回已读取的 HTTP 请求正文的部分。
        //
        // 返回结果:
        //     已读取的 HTTP 请求正文的一部分。
        public virtual byte[] GetPreloadedEntityBody();
        //
        // 摘要:
        //     获取当前已被读取的 HTTP 请求正文的部分的长度。
        //
        // 返回结果:
        //     包含当前已读取的 HTTP 请求正文的长度的整数。
        public virtual int GetPreloadedEntityBodyLength();
        //
        // 摘要:
        //     当在派生类中重写,则返回 HTTP 协议 (HTTP 或 HTTPS)。
        //
        // 返回结果:
        //     HTTPS 如果 System.Web.HttpWorkerRequest.IsSecure 方法是 true, ,否则为 HTTP。
        public virtual string GetProtocol();
        //
        // 摘要:
        //     返回在请求 URL 中指定的查询字符串。
        //
        // 返回结果:
        //     请求查询字符串。
        public abstract string GetQueryString();
        //
        // 摘要:
        //     当在派生类中重写的字节数组形式返回响应查询字符串。
        //
        // 返回结果:
        //     包含响应的字节数组。
        public virtual byte[] GetQueryStringRawBytes();
        //
        // 摘要:
        //     返回包含请求标头中附加了查询字符串的 URL 路径。
        //
        // 返回结果:
        //     原始请求标头的 URL 路径。
        public abstract string GetRawUrl();
        //
        // 摘要:
        //     提供访问权限的请求标头指定的成员。
        //
        // 返回结果:
        //     客户端的 IP 地址。
        public abstract string GetRemoteAddress();
        //
        // 摘要:
        //     当在派生类中重写时返回的客户端计算机的名称。
        //
        // 返回结果:
        //     客户端计算机的名称。
        public virtual string GetRemoteName();
        //
        // 摘要:
        //     提供访问权限的请求标头指定的成员。
        //
        // 返回结果:
        //     客户端的 HTTP 端口号。
        public abstract int GetRemotePort();
        //
        // 摘要:
        //     当在派生类中重写,则返回请求的原因。
        //
        // 返回结果:
        //     原因代码。 默认值为 ReasonResponseCacheMiss。
        public virtual int GetRequestReason();
        //
        // 摘要:
        //     当在派生类中重写返回本地服务器的名称。
        //
        // 返回结果:
        //     本地服务器的名称。
        public virtual string GetServerName();
        //
        // 摘要:
        //     从与请求关联的服务器变量的字典中返回单个服务器变量。
        //
        // 参数:
        //   name:
        //     请求的服务器变量的名称。
        //
        // 返回结果:
        //     请求的服务器变量。
        public virtual string GetServerVariable(string name);
        //
        // 摘要:
        //     获取整个 HTTP 请求正文的长度。
        //
        // 返回结果:
        //     包含整个 HTTP 请求正文的长度的整数。
        public virtual int GetTotalEntityBodyLength();
        //
        // 摘要:
        //     返回一个非标准的 HTTP 请求标头值。
        //
        // 参数:
        //   name:
        //     标头名称。
        //
        // 返回结果:
        //     标头值。
        public virtual string GetUnknownRequestHeader(string name);
        //
        // 摘要:
        //     获取所有非标准的 HTTP 标头名称 / 值对。
        //
        // 返回结果:
        //     标头名称 / 值对的数组。
        [CLSCompliant(false)]
        public virtual string[][] GetUnknownRequestHeaders();
        //
        // 摘要:
        //     请求的 uri 返回的虚拟路径。
        //
        // 返回结果:
        //     请求的 uri 路径。
        public abstract string GetUriPath();
        //
        // 摘要:
        //     当在派生类中重写,则返回当前连接的上下文 ID。
        //
        // 返回结果:
        //     始终返回 0。
        public virtual long GetUrlContextID();
        //
        // 摘要:
        //     当在派生类中重写返回客户端的模拟令牌。
        //
        // 返回结果:
        //     一个表示客户端的模拟令牌值。 默认值为 0。
        public virtual IntPtr GetUserToken();
        //
        // 摘要:
        //     获取模拟标记的请求的虚拟路径。
        //
        // 返回结果:
        //     请求虚拟路径的标记,非托管的内存指针。
        public virtual IntPtr GetVirtualPathToken();
        //
        // 摘要:
        //     返回一个值,该值指示请求是否包含正文数据。
        //
        // 返回结果:
        //     true 如果请求包含正文数据;否则为 false。
        public bool HasEntityBody();
        //
        // 摘要:
        //     返回一个值,该值指示是否 HTTP 响应标头已发送到客户端当前的请求。
        //
        // 返回结果:
        //     true 如果已发送到客户端,则 HTTP 响应标头否则为 false。
        public virtual bool HeadersSent();
        //
        // 摘要:
        //     返回一个值,该值指示客户端连接是否仍处于活动状态。
        //
        // 返回结果:
        //     true 如果客户端连接仍处于活动状态;否则为 false。
        public virtual bool IsClientConnected();
        //
        // 摘要:
        //     有可用值,该值指示是否所有请求数据,并且需要从客户端没有再进一步读取时返回。
        //
        // 返回结果:
        //     true 如果所有请求数据,可用,否则为 false。
        public virtual bool IsEntireEntityBodyIsPreloaded();
        //
        // 摘要:
        //     返回一个值,该值指示连接是否使用 SSL。
        //
        // 返回结果:
        //     如果连接为 SSL 连接,则为 true;否则为 false。 默认值为 false。
        public virtual bool IsSecure();
        //
        // 摘要:
        //     返回与指定的虚拟路径相对应的物理路径。
        //
        // 参数:
        //   virtualPath:
        //     虚拟路径。
        //
        // 返回结果:
        //     中指定的虚拟路径相对应的物理路径 virtualPath 参数。
        public virtual string MapPath(string virtualPath);
        //
        // 摘要:
        //     读取请求从客户端 (时不会预加载) 的数据。
        //
        // 参数:
        //   buffer:
        //     要将数据读入的字节数组。
        //
        //   size:
        //     最多读取的字节数。
        //
        // 返回结果:
        //     读取的字节数。
        public virtual int ReadEntityBody(byte[] buffer, int size);
        //
        // 摘要:
        //     读取请求的数据从客户端 (时不会预加载) 通过使用指定的缓冲区以读取、 的字节偏移量和最大字节数。
        //
        // 参数:
        //   buffer:
        //     要将数据读入的字节数组。
        //
        //   offset:
        //     偏移量开始读取字节。
        //
        //   size:
        //     最多读取的字节数。
        //
        // 返回结果:
        //     读取的字节数。
        public virtual int ReadEntityBody(byte[] buffer, int offset, int size);
        //
        // 摘要:
        //     添加 Content-Length 到大于 2 GB 的消息正文的响应的 HTTP 标头。
        //
        // 参数:
        //   contentLength:
        //     响应中,以字节为单位的长度。
        public virtual void SendCalculatedContentLength(long contentLength);
        //
        // 摘要:
        //     添加 Content-Length 小于或等于 2 GB 的消息正文的响应的 HTTP 标头。
        //
        // 参数:
        //   contentLength:
        //     响应中,以字节为单位的长度。
        public virtual void SendCalculatedContentLength(int contentLength);
        //
        // 摘要:
        //     将标准的 HTTP 标头添加到响应。
        //
        // 参数:
        //   index:
        //     标头索引中。 例如 System.Web.HttpWorkerRequest.HeaderContentLength。
        //
        //   value:
        //     标头的值。
        public abstract void SendKnownResponseHeader(int index, string value);
        //
        // 摘要:
        //     将指定的文件的内容添加到响应,并指定文件和要发送的字节数中的起始位置。
        //
        // 参数:
        //   handle:
        //     要发送的文件句柄。
        //
        //   offset:
        //     该文件中的起始位置。
        //
        //   length:
        //     要发送的字节数。
        public abstract void SendResponseFromFile(IntPtr handle, long offset, long length);
        //
        // 摘要:
        //     将指定的文件的内容添加到响应,并指定文件和要发送的字节数中的起始位置。
        //
        // 参数:
        //   filename:
        //     要发送的文件的名称。
        //
        //   offset:
        //     该文件中的起始位置。
        //
        //   length:
        //     要发送的字节数。
        public abstract void SendResponseFromFile(string filename, long offset, long length);
        //
        // 摘要:
        //     将指定的数目的字节从内存块添加到响应。
        //
        // 参数:
        //   data:
        //     指向内存块的非托管的指针。
        //
        //   length:
        //     要发送的字节数。
        public virtual void SendResponseFromMemory(IntPtr data, int length);
        //
        // 摘要:
        //     将字节数组中的指定的数目的字节添加到响应中。
        //
        // 参数:
        //   data:
        //     要发送的字节数组。
        //
        //   length:
        //     发送的字节开头的第一个字节数。
        public abstract void SendResponseFromMemory(byte[] data, int length);
        //
        // 摘要:
        //     如指定的响应的 HTTP 状态代码和状态说明 SendStatus(200, "Ok")。
        //
        // 参数:
        //   statusCode:
        //     要发送的状态代码
        //
        //   statusDescription:
        //     要发送的状态说明。
        public abstract void SendStatus(int statusCode, string statusDescription);
        //
        // 摘要:
        //     将非标准的 HTTP 标头添加到响应。
        //
        // 参数:
        //   name:
        //     要发送的标头的名称。
        //
        //   value:
        //     标头的值。
        public abstract void SendUnknownResponseHeader(string name, string value);
        //
        // 摘要:
        //     发送所有响应数据时,将可选通知注册。
        //
        // 参数:
        //   callback:
        //     通知回调时所调用的所有数据将都发送 (带外)。
        //
        //   extraData:
        //     回拨一个附加参数。
        public virtual void SetEndOfSendNotification(EndOfSendNotification callback, object extraData);

        //
        // 摘要:
        //     表示通知调用方发送的响应时已完成的方法。
        //
        // 参数:
        //   wr:
        //     当前的 System.Web.HttpWorkerRequest。
        //
        //   extraData:
        //     处理请求所需的任何额外的数据。
        public delegate void EndOfSendNotification(HttpWorkerRequest wr, object extraData);
    }
}
2、
2.返回顶部
 
3.返回顶部
 
4.返回顶部
 
5.返回顶部
 
 
6.返回顶部
 
warn 作者:ylbtech
出处:http://ylbtech.cnblogs.com/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
原文地址:https://www.cnblogs.com/storebook/p/12676432.html