ListenOptions 類別

定義

描述 IPEndPoint Kestrel 應該系結至或開啟之已開啟通訊端的 、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

取得通訊端的系結檔案描述元。

HandleType

描述 IPEndPoint Kestrel 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑、具名管道名稱或檔案描述元。

IPEndPoint

取得系結 IPEndPoint

KestrelServerOptions

KestrelServerOptions取得接聽程式選項的 。 啟用連線中介軟體,以解析和使用應用程式在啟動期間註冊的服務。

NoDelay

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

PipeName

取得將管道名稱系結至名稱管道伺服器。

Protocols

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

SocketPath

取得 Unix 網域通訊端的系結絕對路徑。

Type

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

方法

Build()

建置 ConnectionDelegate

Clone(IPAddress)

用於複製到兩個 IPEndpoints

ToString()

描述 IPEndPoint Kestrel 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑、具名管道名稱或檔案描述元。

Use(Func<ConnectionDelegate,ConnectionDelegate>)

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

明確介面實作

IMultiplexedConnectionBuilder.Build()

描述 IPEndPoint Kestrel 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑、具名管道名稱或檔案描述元。

IMultiplexedConnectionBuilder.Use(Func<MultiplexedConnectionDelegate,MultiplexedConnectionDelegate>)

描述 IPEndPoint Kestrel 應該系結至或開啟之已開啟通訊端的 、Unix 網域通訊端路徑、具名管道名稱或檔案描述元。

擴充方法

Run(IConnectionBuilder, Func<ConnectionContext,Task>)

將指定的 middleware 新增至連線。

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

將指定的 middleware 新增至連線。 如果您未呼叫下一個函式,請改用 Run(IConnectionBuilder, Func<ConnectionContext,Task>)

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

將指定的 middleware 新增至連線。 如果您未呼叫下一個函式,請改用 Run(IConnectionBuilder, Func<ConnectionContext,Task>)

偏好使用 Use(IConnectionBuilder, Func<ConnectionContext,ConnectionDelegate,Task>) 以提升效能,如下所示:

builder.Use((context, next) =>
{
    return next(context);
});
UseConnectionHandler<TConnectionHandler>(IConnectionBuilder)

使用指定的 TConnectionHandlerConnectionHandler

UseConnectionTimeout(ListenOptions)

新增連線逾時中介軟體。

UseConnectionLogging(ListenOptions)

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

UseConnectionLogging(ListenOptions, String)

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

UseHttps(ListenOptions)

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

UseHttps(ListenOptions, HttpsConnectionAdapterOptions)

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

UseHttps(ListenOptions, TlsHandshakeCallbackOptions)

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

UseHttps(ListenOptions, Action<HttpsConnectionAdapterOptions>)

設定 Kestrel 使用 HTTPS。

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object)

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

UseHttps(ListenOptions, ServerOptionsSelectionCallback, Object, TimeSpan)

設定 Kestrel 使用 HTTPS。 這不會使用透過組態或 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

適用於