KestrelServerOptions 類別

定義

提供 Kestrel 特定功能的程式設計設定。

public ref class KestrelServerOptions
public class KestrelServerOptions
type KestrelServerOptions = class
Public Class KestrelServerOptions
繼承
KestrelServerOptions

建構函式

KestrelServerOptions()

提供 Kestrel 特定功能的程式設計設定。

屬性

AddServerHeader

取得或設定標頭是否 Server 應該包含在每個回應中。

ApplicationServices

啟用 UseKestrel 選項回呼,以解析和使用應用程式在啟動期間註冊的服務。 通常由 UseKestrel(IWebHostBuilder, Action<KestrelServerOptions>) 初始化。

ConnectionFilter

取得或設定 , IConnectionFilter 允許攔截和轉換每個連接 Stream 。 由 UseHttps()UseConnectionLogging(KestrelServerOptions) 擴充方法設定。

Limits

提供要求限制選項的存取權。

MaxRequestBufferSize
已淘汰.

這個屬性已過時,未來版本將會移除。 請改用 Limits.MaxRequestBufferSize

取得或設定要求緩衝區的大小上限。

NoDelay

設定為 false 以啟用所有連線的 Nagle 演算法。

ShutdownTimeout

伺服器開始關閉之後的時間量,會強制關閉連線。 Kestrel 會等候逾時期間,讓任何進行中的要求處理在終止連線之前完成。 此時將不會接受任何新的連線或要求。

ThreadCount

用來處理要求的 libuv I/O 執行緒數目。

擴充方法

UseConnectionLogging(KestrelServerOptions)

發出讀取和寫入連線之位元組的詳細資訊記錄。

UseConnectionLogging(KestrelServerOptions, String)

發出讀取和寫入連線之位元組的詳細資訊記錄。

UseHttps(KestrelServerOptions, HttpsConnectionFilterOptions)

設定 Kestrel 使用 HTTPS。

UseHttps(KestrelServerOptions, X509Certificate2)

設定 Kestrel 使用 HTTPS。

UseHttps(KestrelServerOptions, String)

設定 Kestrel 使用 HTTPS。

UseHttps(KestrelServerOptions, String, String)

設定 Kestrel 使用 HTTPS。

適用於