Redigera

Dela via


QuicListener.AcceptConnectionAsync(CancellationToken) Method

Definition

Accepts an inbound QuicConnection.

public System.Threading.Tasks.ValueTask<System.Net.Quic.QuicConnection> AcceptConnectionAsync (System.Threading.CancellationToken cancellationToken = default);
member this.AcceptConnectionAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Net.Quic.QuicConnection>
Public Function AcceptConnectionAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of QuicConnection)

Parameters

cancellationToken
CancellationToken

A cancellation token that can be used to cancel the asynchronous operation.

Returns

A task that contains a fully connected QuicConnection that successfully finished the handshake and is ready to be used.

Exceptions

The cancellation token was canceled. This exception is stored into the returned task.

Remarks

This method also propagates exceptions from the process of establishing a connection, including:

Applies to