IConnectionListenerFactory.BindAsync(EndPoint, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates an IConnectionListener bound to the specified EndPoint.
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IConnectionListener> BindAsync (System.Net.EndPoint endpoint, System.Threading.CancellationToken cancellationToken = default);
abstract member BindAsync : System.Net.EndPoint * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.IConnectionListener>
Public Function BindAsync (endpoint As EndPoint, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of IConnectionListener)
Parameters
- cancellationToken
- CancellationToken
The token to monitor for cancellation requests.
Returns
A ValueTask<TResult> that completes when the listener has been bound, yielding a IConnectionListener representing the new listener.