ListenOptions 類別

定義

描述 Kestrel IPEndPoint 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑或檔案描述項。

public ref class ListenOptions : Microsoft::AspNetCore::Server::Kestrel::Transport::Abstractions::Internal::IEndPointInformation
public ref class ListenOptions : Microsoft::AspNetCore::Connections::IConnectionBuilder, Microsoft::AspNetCore::Server::Kestrel::Transport::Abstractions::Internal::IEndPointInformation
public ref class ListenOptions : Microsoft::AspNetCore::Connections::IConnectionBuilder
public class ListenOptions : Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder, Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder
public class ListenOptions : Microsoft.AspNetCore.Connections.IConnectionBuilder, Microsoft.AspNetCore.Connections.IMultiplexedConnectionBuilder
type ListenOptions = class
    interface IEndPointInformation
type ListenOptions = class
    interface IEndPointInformation
    interface IConnectionBuilder
type ListenOptions = class
    interface IConnectionBuilder
type ListenOptions = class
    interface IConnectionBuilder
    interface IMultiplexedConnectionBuilder
Public Class ListenOptions
Implements IEndPointInformation
Public Class ListenOptions
Implements IConnectionBuilder, IEndPointInformation
Public Class ListenOptions
Implements IConnectionBuilder
Public Class ListenOptions
Implements IConnectionBuilder, IMultiplexedConnectionBuilder
繼承
ListenOptions
實作
Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal.IEndPointInformation IConnectionBuilder IMultiplexedConnectionBuilder

屬性

ApplicationServices

取得應用程式 IServiceProvider

ConnectionAdapters

取得 , List<T> 允許攔截和轉換每個連接 Stream 。 由 UseHttps()UseConnectionLogging(ListenOptions) 擴充方法設定。

DisableAltSvcHeader

取得或設定值,這個值控制回應標頭是否包含 「Alt-Svc」 標頭。 用戶端會使用 「Alt-Svc」 標頭,將 HTTP/1.1 和 HTTP/2 連線升級至 HTTP/3。

如果 Protocols 已啟用 HTTP/1.1 或 HTTP/2,且已啟用 HTTP/3,則會自動包含回應中的 「Alt-Svc」 標頭。 如果應用程式已經設定 「Alt-Svc」 標頭值,則不會變更。

EndPoint

取得 EndPoint

FileHandle

要開啟之通訊端的檔案描述項。 只有在 是 FileHandleEndPoint 時才 ListenOptionsType 設定 。

HandleType

描述 Kestrel IPEndPoint 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑或檔案描述項。

IPEndPoint

要系結至的 IPEndPoint 。 只有在 是 IPEndPoint 時才 ListenOptionsType 設定 。

KestrelServerOptions

讓連線中介軟體能夠解析和使用應用程式在啟動期間註冊的服務。 只有在從 Listen* 方法的 KestrelServerOptions 回呼存取時才設定。

NoDelay

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

Protocols

在此端點上啟用的通訊協定。

SocketPath

要系結至之 Unix 網域通訊端的絕對路徑。 只有在 是 UnixDomainSocketEndPoint 時才 ListenOptionsType 設定 。

Type

所描述的介面類別型:、 IPEndPoint Unix 網域通訊端路徑或檔案描述項。

方法

Build()

建置 ConnectionDelegate

ToString()

描述 Kestrel IPEndPoint 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑或檔案描述項。

Use(Func<ConnectionDelegate,ConnectionDelegate>)

將中介軟體委派新增至連接管線。 由 UseHttps()UseConnectionLogging(ListenOptions) 擴充方法設定。

明確介面實作

IMultiplexedConnectionBuilder.Build()

描述 Kestrel IPEndPoint 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑或檔案描述項。

IMultiplexedConnectionBuilder.Use(Func<MultiplexedConnectionDelegate,MultiplexedConnectionDelegate>)

描述 Kestrel IPEndPoint 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑或檔案描述項。

擴充方法

Run(IConnectionBuilder, Func<ConnectionContext,Task>)

將指定的 middleware 新增至連接。

Use(IConnectionBuilder, Func<ConnectionContext,Func<Task>,Task>)

將指定的 middleware 新增至連接。

UseConnectionHandler<TConnectionHandler>(IConnectionBuilder)

使用指定的 TConnectionHandlerConnectionHandler

UseConnectionLogging(ListenOptions)

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

UseConnectionLogging(ListenOptions, String)

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

UseHttps(ListenOptions)

如果可用,請將 Kestrel 設定為搭配預設憑證使用 HTTPS。 如果未設定預設憑證,這會擲回。

UseHttps(ListenOptions, HttpsConnectionAdapterOptions)

設定 Kestrel 使用 HTTPS。 這不會使用透過 config 或 ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>) 指定的預設憑證或其他預設值。

UseHttps(ListenOptions, TlsHandshakeCallbackOptions)

設定 Kestrel 使用 HTTPS。 這不會使用透過 config 或 ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>) 指定的預設憑證或其他預設值。

UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object)

設定 Kestrel 使用 HTTPS。 這不會使用透過 config 或 ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>) 指定的預設憑證或其他預設值。

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object, TimeSpan)

設定 Kestrel 使用 HTTPS。 這不會使用透過 config 或 ConfigureHttpsDefaults(Action<HttpsConnectionAdapterOptions>) 指定的預設憑證或其他預設值。

UseHttps(ListenOptions, StoreName, String)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, StoreName, String, Boolean)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, StoreName, String, Boolean, StoreLocation, Action<HttpsConnectionAdapterOptions>)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, X509Certificate2)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, X509Certificate2, Action<HttpsConnectionAdapterOptions>)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, String)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, String, String)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, String, String, Action<HttpsConnectionAdapterOptions>)

設定 Kestrel 使用 HTTPS。

UseHub<THub>(IConnectionBuilder)

設定連接以裝載指定的 Hub 類型。

適用於