共用方式為


IMultiplexedConnectionListenerFactory.BindAsync 方法

定義

建立系 IMultiplexedConnectionListener 結至指定 EndPoint 之 的 。

public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IMultiplexedConnectionListener> BindAsync (System.Net.EndPoint endpoint, Microsoft.AspNetCore.Http.Features.IFeatureCollection? features = default, System.Threading.CancellationToken cancellationToken = default);
abstract member BindAsync : System.Net.EndPoint * Microsoft.AspNetCore.Http.Features.IFeatureCollection * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IMultiplexedConnectionListener>
Public Function BindAsync (endpoint As EndPoint, Optional features As IFeatureCollection = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of IMultiplexedConnectionListener)

參數

endpoint
EndPoint

要系結至的 EndPoint

features
IFeatureCollection

在系結時傳遞選項的功能集合。

cancellationToken
CancellationToken

用來監視是否有取消要求的語彙基元。

傳回

ValueTask<TResult> 會在接聽程式已系結時完成,產生 IMultiplexedConnectionListener 代表新接聽程式的 。

適用於