HttpConnectionFactory.ConnectAsync(EndPoint, CancellationToken) Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Erstellt eine neue Verbindung mit einem UriEndPoint.
public System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext> ConnectAsync (System.Net.EndPoint endPoint, System.Threading.CancellationToken cancellationToken = default);
abstract member ConnectAsync : System.Net.EndPoint * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext>
override this.ConnectAsync : System.Net.EndPoint * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<Microsoft.AspNetCore.Connections.ConnectionContext>
Public Function ConnectAsync (endPoint As EndPoint, Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of ConnectionContext)
Parameter
- endPoint
- EndPoint
Die , mit der UriEndPoint eine Verbindung hergestellt werden soll.
- cancellationToken
- CancellationToken
Das Token zum Überwachen von Abbruchanforderungen. Der Standardwert ist None.
Gibt zurück
Ein ValueTask<TResult> , der die asynchrone Verbindung darstellt und nach Abschluss der neuen Verbindung den ConnectionContext ergibt.