Share via


IMultiplexedConnectionListenerFactory.BindAsync Method

Definition

Creates an IMultiplexedConnectionListener bound to the specified 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)

Parameters

endpoint
EndPoint

The EndPoint to bind to.

features
IFeatureCollection

A feature collection to pass options when binding.

cancellationToken
CancellationToken

The token to monitor for cancellation requests.

Returns

A ValueTask<TResult> that completes when the listener has been bound, yielding a IMultiplexedConnectionListener representing the new listener.

Applies to