QuicListener.AcceptConnectionAsync(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.
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:
- Errors from ConnectionOptionsCallback as QuicException with CallbackError error type.
- Validation errors from misconfigured QuicServerConnectionOptions returned by ConnectionOptionsCallback as ArgumentException.
- Exceptions from failed connection handshakes as AuthenticationException or QuicException.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET